#include <gmlib/sm2/internal/sm2p256v1.h>
#include <stdexcept>
#include <cstring>

using namespace sm2::internal;

void test_sm2_fp_sub()
{
    sm2_fp_t    a, b, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0x20,0x4f,0x9f,0x6b,0x6a,0xaf,0xd6,0x72,0x20,0xb7,0x72,0x4b,0xda,0x4c,0x0c,0xea,0x40,0x98,0xba,0x02,0x90,0x9f,0xa2,0xfe,0x26,0xb5,0x59,0x9d,0x4f,0x7a,0x8a,0x7c};
    static std::uint8_t b0[32] = {0x84,0x83,0x80,0xae,0x4a,0xdd,0x36,0x75,0xd9,0x4d,0xf1,0x47,0xb1,0xc2,0x86,0xf1,0x32,0x87,0xc1,0xfe,0x97,0xf5,0xcb,0x3a,0x16,0x66,0x01,0xda,0xc4,0x7c,0x49,0x54};
    static std::uint8_t c0[32] = {0x9b,0xcc,0x1e,0xbc,0x1f,0xd2,0x9f,0xfc,0x47,0x69,0x81,0x04,0x28,0x89,0x85,0xf9,0x0e,0x10,0xf8,0x02,0xf8,0xa9,0xd7,0xc5,0x10,0x4f,0x57,0xc2,0x8a,0xfe,0x41,0x27};
    sm2_fp_from_bytes(a, a0);
    sm2_fp_from_bytes(b, b0);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a1[32] = {0x7f,0xa8,0x3a,0xfb,0x41,0xe4,0x60,0xc2,0x50,0xe8,0xca,0x49,0x55,0xd6,0x50,0x2d,0x9a,0x23,0x2c,0xba,0xe4,0xd9,0x0b,0xf4,0x91,0xfb,0x2a,0x6e,0x99,0xb6,0x94,0x62};
    static std::uint8_t b1[32] = {0x9c,0xed,0x7b,0x15,0x78,0xbe,0xb0,0xfe,0x59,0x35,0x8a,0x13,0x92,0x31,0xe4,0x38,0xf2,0x52,0xc7,0xcb,0x09,0x29,0xb6,0xfc,0x7f,0x61,0xa5,0xcb,0x39,0x5e,0x87,0x22};
    static std::uint8_t c1[32] = {0xe2,0xba,0xbf,0xe4,0xc9,0x25,0xaf,0xc3,0xf7,0xb3,0x40,0x35,0xc3,0xa4,0x6b,0xf4,0xa7,0xd0,0x64,0xee,0xdb,0xaf,0x54,0xf9,0x12,0x99,0x84,0xa3,0x60,0x58,0x0d,0x3f};
    sm2_fp_from_bytes(a, a1);
    sm2_fp_from_bytes(b, b1);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a2[32] = {0x5a,0xd1,0x23,0x65,0xac,0xd6,0x9f,0xc2,0x5b,0x3e,0x81,0xbc,0xc3,0xce,0x33,0x6d,0xd0,0x95,0x63,0x83,0x17,0x83,0x1d,0x3d,0xcd,0x99,0x30,0x6c,0xc9,0x62,0x48,0x4d};
    static std::uint8_t b2[32] = {0x7c,0x33,0x46,0x32,0x83,0x81,0x79,0xe0,0xb3,0x02,0x32,0xab,0x25,0xab,0x35,0x33,0x32,0x91,0x6c,0x45,0xd0,0xd7,0x27,0xcb,0xef,0x4c,0xdd,0xb8,0x46,0xe3,0xfa,0x63};
    static std::uint8_t c2[32] = {0xde,0x9d,0xdd,0x32,0x29,0x55,0x25,0xe1,0xa8,0x3c,0x4f,0x11,0x9e,0x22,0xfe,0x3a,0x9e,0x03,0xf7,0x3c,0x46,0xab,0xf5,0x72,0xde,0x4c,0x52,0xb4,0x82,0x7e,0x4d,0xe9};
    sm2_fp_from_bytes(a, a2);
    sm2_fp_from_bytes(b, b2);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a3[32] = {0x7e,0x53,0xcc,0x7c,0x25,0x88,0xb2,0x68,0x96,0x4b,0xac,0xc6,0xec,0xef,0xdd,0xce,0x14,0x23,0x3f,0xe6,0xb4,0xf9,0x82,0xfe,0xb7,0x10,0xbf,0xe3,0x9e,0x85,0xa5,0x1a};
    static std::uint8_t b3[32] = {0xb6,0x74,0xc1,0xe8,0x09,0xf2,0x10,0x17,0x65,0xe3,0xe6,0x02,0xb9,0x9d,0xb3,0x8a,0x60,0x17,0x3a,0xd5,0xd9,0xcf,0xca,0x4a,0xe0,0x90,0xd1,0x6c,0xc6,0xa7,0xad,0xd6};
    static std::uint8_t c3[32] = {0xc7,0xdf,0x0a,0x93,0x1b,0x96,0xa2,0x51,0x30,0x67,0xc6,0xc4,0x33,0x52,0x2a,0x43,0xb4,0x0c,0x05,0x0f,0xdb,0x29,0xb8,0xb4,0xd6,0x7f,0xee,0x76,0xd7,0xdd,0xf7,0x43};
    sm2_fp_from_bytes(a, a3);
    sm2_fp_from_bytes(b, b3);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a4[32] = {0x07,0x87,0x7c,0xcb,0x93,0xd6,0x67,0x95,0x43,0xa3,0xa3,0xf2,0x36,0x01,0x6e,0xfa,0xd2,0x9b,0xda,0xb9,0xc3,0xd2,0xec,0xdc,0xdc,0x64,0xc1,0x65,0xfb,0x2a,0xd3,0x58};
    static std::uint8_t b4[32] = {0x73,0x43,0x88,0x8c,0x84,0x92,0x34,0xc8,0x35,0x2e,0x12,0x7e,0xdb,0x23,0x5b,0x8d,0x7a,0xee,0x62,0x70,0xd3,0xe9,0xac,0x0a,0x13,0xf9,0x2b,0x7f,0xf3,0xa1,0xc9,0xfe};
    static std::uint8_t c4[32] = {0x94,0x43,0xf4,0x3e,0x0f,0x44,0x32,0xcd,0x0e,0x75,0x91,0x73,0x5a,0xde,0x13,0x6d,0x57,0xad,0x78,0x47,0xef,0xe9,0x40,0xd3,0xc8,0x6b,0x95,0xe6,0x07,0x89,0x09,0x59};
    sm2_fp_from_bytes(a, a4);
    sm2_fp_from_bytes(b, b4);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a5[32] = {0x20,0x16,0xc0,0x6b,0xa1,0x69,0x80,0x43,0x4b,0x00,0x04,0xa4,0x15,0xce,0x8d,0x0a,0x21,0xbd,0x56,0xbc,0xe6,0x89,0x56,0x86,0x1d,0x98,0x72,0xc2,0x04,0x00,0xd9,0x7c};
    static std::uint8_t b5[32] = {0xc7,0x82,0x86,0xa6,0x44,0x82,0xaa,0x6b,0x29,0x91,0x29,0xda,0x3f,0xa0,0xb3,0x30,0xcb,0x3a,0xe8,0xd0,0x94,0xd7,0x73,0x43,0xae,0xa0,0xf1,0xad,0xa7,0x52,0xb5,0x5e};
    static std::uint8_t c5[32] = {0x58,0x94,0x39,0xc4,0x5c,0xe6,0xd5,0xd8,0x21,0x6e,0xda,0xc9,0xd6,0x2d,0xd9,0xd9,0x56,0x82,0x6d,0xeb,0x51,0xb1,0xe3,0x43,0x6e,0xf7,0x81,0x14,0x5c,0xae,0x24,0x1d};
    sm2_fp_from_bytes(a, a5);
    sm2_fp_from_bytes(b, b5);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a6[32] = {0x74,0x99,0x5d,0xab,0x94,0x34,0x8d,0xfe,0x32,0x6e,0x8f,0xce,0xaa,0x45,0xa2,0x3d,0xfe,0x7b,0x52,0x24,0x16,0x95,0x3d,0x8d,0x3c,0x47,0x31,0x4a,0x20,0x3b,0x47,0x2d};
    static std::uint8_t b6[32] = {0xfc,0x03,0x8a,0x51,0x8c,0x25,0x59,0x41,0x53,0x5b,0x4c,0x2f,0xdc,0x13,0x79,0x7a,0xc1,0xf3,0xce,0xd3,0x5b,0xff,0x6d,0xf2,0xba,0xc3,0xe5,0x7f,0xf8,0x22,0xfe,0x96};
    static std::uint8_t c6[32] = {0x78,0x95,0xd3,0x59,0x08,0x0f,0x34,0xbc,0xdf,0x13,0x43,0x9e,0xce,0x32,0x28,0xc3,0x3c,0x87,0x83,0x4f,0xba,0x95,0xcf,0x9b,0x81,0x83,0x4b,0xca,0x28,0x18,0x48,0x96};
    sm2_fp_from_bytes(a, a6);
    sm2_fp_from_bytes(b, b6);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a7[32] = {0x49,0xf2,0x26,0x1a,0x13,0x8b,0x9b,0xf7,0x1d,0x67,0x47,0x8d,0x0d,0x60,0x5e,0xa4,0x5d,0xfc,0x37,0x8a,0x50,0x59,0x0f,0x2a,0x07,0x41,0xdc,0x00,0x2e,0x98,0x07,0x3c};
    static std::uint8_t b7[32] = {0xfc,0x68,0x6d,0x63,0x2a,0x04,0xe4,0x82,0xa3,0xbd,0xc3,0xdd,0x54,0x7d,0x84,0x63,0x29,0xdf,0x3d,0xdf,0xad,0xef,0x9b,0xeb,0x94,0x97,0x98,0xe3,0x17,0x9f,0x74,0xd4};
    static std::uint8_t c7[32] = {0x4d,0x89,0xb8,0xb5,0xe9,0x86,0xb7,0x74,0x79,0xa9,0x83,0xaf,0xb8,0xe2,0xda,0x41,0x34,0x1c,0xf9,0xa9,0xa2,0x69,0x73,0x3f,0x72,0xaa,0x43,0x1d,0x16,0xf8,0x92,0x67};
    sm2_fp_from_bytes(a, a7);
    sm2_fp_from_bytes(b, b7);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a8[32] = {0xdf,0x7a,0x16,0x4d,0xa5,0x8f,0xb5,0xf6,0xd0,0xfb,0xdb,0xf4,0x82,0xd5,0x31,0xe5,0x07,0x2f,0x12,0x25,0x38,0x4d,0xd0,0x94,0x63,0x29,0x3d,0x06,0xf7,0xb9,0xca,0xb4};
    static std::uint8_t b8[32] = {0xaf,0xab,0xa8,0x3e,0xb1,0xe6,0x54,0xc9,0x08,0x79,0x0b,0x3b,0x35,0x55,0x11,0x37,0xc8,0xb2,0x24,0xeb,0xbc,0x7f,0xdf,0x67,0x1d,0x40,0xfe,0x0b,0x5d,0x3f,0x90,0xee};
    static std::uint8_t c8[32] = {0x2f,0xce,0x6e,0x0e,0xf3,0xa9,0x61,0x2d,0xc8,0x82,0xd0,0xb9,0x4d,0x80,0x20,0xad,0x3e,0x7c,0xed,0x39,0x7b,0xcd,0xf1,0x2d,0x45,0xe8,0x3e,0xfb,0x9a,0x7a,0x39,0xc6};
    sm2_fp_from_bytes(a, a8);
    sm2_fp_from_bytes(b, b8);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a9[32] = {0x4f,0xa3,0xe5,0xe6,0x3b,0xdd,0xea,0x64,0x2a,0x23,0xb4,0x02,0x42,0x3c,0x7e,0x94,0xab,0x5c,0x77,0x76,0x04,0x97,0xe7,0xa4,0x7e,0xca,0x37,0xfa,0x2f,0xce,0xc7,0x96};
    static std::uint8_t b9[32] = {0xff,0x32,0x28,0x5c,0x26,0xac,0x0a,0x6d,0x08,0x52,0xf6,0x61,0x80,0xe6,0x49,0x8e,0xd8,0xb7,0x29,0x2c,0x2c,0x24,0x7f,0x41,0x72,0x6b,0x8d,0xd7,0xae,0x9f,0xfc,0xb4};
    static std::uint8_t c9[32] = {0x50,0x71,0xbd,0x89,0x15,0x31,0xdf,0xf7,0x21,0xd0,0xbd,0xa0,0xc1,0x56,0x35,0x05,0xd2,0xa5,0x4e,0x48,0xd8,0x73,0x68,0x64,0x0c,0x5e,0xaa,0x22,0x81,0x2e,0xca,0xe1};
    sm2_fp_from_bytes(a, a9);
    sm2_fp_from_bytes(b, b9);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a10[32] = {0x6e,0x70,0x7c,0x8c,0x9b,0xcb,0x5f,0xc6,0x33,0x5f,0x64,0x0b,0x9a,0x7b,0xb4,0xe4,0x78,0x93,0x44,0x32,0xba,0x87,0xc0,0xde,0xc6,0x3b,0x97,0x58,0xd0,0x32,0x84,0x89};
    static std::uint8_t b10[32] = {0xf6,0xdd,0x29,0x47,0x01,0x99,0x5b,0xa1,0x98,0x39,0xe5,0xc4,0x17,0x2c,0x10,0x79,0x5d,0xc4,0x71,0xc5,0xc8,0xd1,0xa4,0x09,0xd4,0x0c,0xe0,0xd8,0xbd,0x15,0xef,0x3d};
    static std::uint8_t c10[32] = {0x77,0x93,0x53,0x44,0x9a,0x32,0x04,0x24,0x9b,0x25,0x7e,0x47,0x83,0x4f,0xa4,0x6b,0x1a,0xce,0xd2,0x6b,0xf1,0xb6,0x1c,0xd5,0xf2,0x2e,0xb6,0x80,0x13,0x1c,0x95,0x4b};
    sm2_fp_from_bytes(a, a10);
    sm2_fp_from_bytes(b, b10);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a11[32] = {0x25,0x49,0x21,0x29,0xe6,0xfd,0x91,0xd5,0x49,0xc3,0xa1,0x36,0x75,0x5c,0x2b,0xd8,0x03,0xa5,0xcd,0xe2,0xd4,0x6a,0x87,0xbf,0xb3,0x4a,0x01,0x5d,0x63,0x98,0xa3,0xaf};
    static std::uint8_t b11[32] = {0x4b,0x2d,0x6d,0x55,0x67,0x53,0xc4,0x6b,0x2c,0x97,0x7b,0xc1,0x35,0xc2,0xcd,0x8b,0x7e,0x48,0x6d,0xbc,0x60,0x1c,0xc0,0x98,0x25,0x89,0x70,0x2c,0xd0,0x35,0xf1,0xe5};
    static std::uint8_t c11[32] = {0xda,0x1b,0xb3,0xd3,0x7f,0xa9,0xcd,0x6a,0x1d,0x2c,0x25,0x75,0x3f,0x99,0x5e,0x4c,0x85,0x5d,0x60,0x25,0x74,0x4d,0xc7,0x28,0x8d,0xc0,0x91,0x30,0x93,0x62,0xb1,0xc9};
    sm2_fp_from_bytes(a, a11);
    sm2_fp_from_bytes(b, b11);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a12[32] = {0x56,0xed,0x8d,0xed,0xd5,0xd8,0x40,0x98,0x35,0xfc,0x8b,0x45,0xd2,0xc5,0x62,0x13,0xa3,0x85,0x0a,0x01,0xb3,0xca,0x1c,0x4e,0x9c,0x3a,0x45,0xc3,0x67,0x10,0x77,0x81};
    static std::uint8_t b12[32] = {0x7d,0x33,0x43,0x74,0x58,0x81,0x36,0x36,0xdd,0xe1,0x90,0x13,0x24,0x57,0x7d,0x99,0x89,0x8a,0xbb,0x4d,0xad,0xe7,0x43,0x05,0x0c,0x76,0x10,0xdb,0x3b,0x3d,0x55,0x9b};
    static std::uint8_t c12[32] = {0xd9,0xba,0x4a,0x78,0x7d,0x57,0x0a,0x61,0x58,0x1a,0xfb,0x32,0xae,0x6d,0xe4,0x7a,0x19,0xfa,0x4e,0xb3,0x05,0xe2,0xd9,0x4a,0x8f,0xc4,0x34,0xe8,0x2b,0xd3,0x21,0xe5};
    sm2_fp_from_bytes(a, a12);
    sm2_fp_from_bytes(b, b12);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a13[32] = {0x19,0xe8,0x51,0x37,0xcc,0x5a,0xda,0x4c,0x61,0x6c,0x10,0xf2,0xbc,0xfd,0xc1,0x2a,0xbe,0xcb,0xbd,0xf6,0x06,0x4f,0xe7,0x7c,0x19,0xfc,0x6b,0xfe,0x75,0x45,0xa3,0x8a};
    static std::uint8_t b13[32] = {0x47,0xb6,0xf2,0x4e,0x7f,0xed,0x2f,0x29,0x30,0x32,0x8e,0x67,0x54,0xdf,0x75,0x09,0x3e,0x18,0x3f,0xe2,0x05,0xb2,0x2d,0x4c,0x74,0xda,0xfb,0xaa,0x53,0xa0,0xec,0x84};
    static std::uint8_t c13[32] = {0xd2,0x31,0x5e,0xe8,0x4c,0x6d,0xab,0x23,0x31,0x39,0x82,0x8b,0x68,0x1e,0x4c,0x21,0x80,0xb3,0x7e,0x13,0x00,0x9d,0xba,0x30,0xa5,0x21,0x70,0x54,0x21,0xa4,0xb7,0x05};
    sm2_fp_from_bytes(a, a13);
    sm2_fp_from_bytes(b, b13);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a14[32] = {0x16,0x1f,0x3a,0x42,0xe5,0x27,0xd1,0x3a,0x24,0xce,0x21,0xb2,0x95,0x04,0x56,0xaa,0x75,0x4d,0x27,0xd4,0xe9,0xb9,0xe3,0x65,0xb2,0xfa,0x57,0x03,0x19,0xc2,0xb6,0x2e};
    static std::uint8_t b14[32] = {0xe0,0x11,0xd0,0x75,0xc0,0x53,0x67,0xe1,0x56,0xea,0x49,0x16,0x7b,0xd5,0x4f,0x83,0x27,0x87,0x6a,0x0d,0x6c,0x98,0x69,0x40,0x04,0xbd,0x03,0x50,0x17,0x83,0xd9,0x05};
    static std::uint8_t c14[32] = {0x36,0x0d,0x69,0xcc,0x24,0xd4,0x69,0x58,0xcd,0xe3,0xd8,0x9c,0x19,0x2f,0x07,0x27,0x4d,0xc5,0xbd,0xc6,0x7d,0x21,0x7a,0x26,0xae,0x3d,0x53,0xb3,0x02,0x3e,0xdd,0x28};
    sm2_fp_from_bytes(a, a14);
    sm2_fp_from_bytes(b, b14);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a15[32] = {0x0c,0x47,0x94,0x5d,0x84,0xa7,0x2c,0x9e,0x3a,0xca,0xde,0x00,0xf0,0xcd,0xfc,0xdf,0x49,0x18,0xc0,0xa7,0x52,0x79,0x3e,0x6d,0x4b,0xae,0x1a,0x11,0xa6,0x10,0xf4,0x9e};
    static std::uint8_t b15[32] = {0x21,0x23,0x2f,0x52,0xbc,0x71,0x52,0x6b,0x87,0x93,0xb0,0x43,0x4c,0x22,0x11,0xa5,0x9a,0x92,0xeb,0x30,0x2d,0xd1,0x25,0x20,0x97,0x4f,0x86,0x92,0xca,0x6d,0x45,0x50};
    static std::uint8_t c15[32] = {0xeb,0x24,0x65,0x09,0xc8,0x35,0xda,0x32,0xb3,0x37,0x2d,0xbd,0xa4,0xab,0xeb,0x39,0xae,0x85,0xd5,0x76,0x24,0xa8,0x19,0x4d,0xb4,0x5e,0x93,0x7e,0xdb,0xa3,0xaf,0x4d};
    sm2_fp_from_bytes(a, a15);
    sm2_fp_from_bytes(b, b15);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a16[32] = {0xd3,0x31,0x32,0xb4,0x2a,0x3a,0xe0,0x2e,0x94,0x61,0x5c,0x40,0xf1,0xc5,0xa3,0xab,0xa0,0x6b,0x14,0xf0,0x7e,0x9f,0xcf,0xa0,0xe7,0x91,0x38,0xb4,0xf8,0x6d,0x7a,0xda};
    static std::uint8_t b16[32] = {0x4b,0x73,0x91,0x7d,0x3a,0xda,0x45,0xc3,0xdf,0x28,0x6d,0xf2,0x7e,0x94,0x7f,0xc4,0x71,0x9d,0xeb,0x84,0x03,0x0b,0x27,0x8e,0x57,0x4b,0x44,0xdb,0x9c,0xa6,0x25,0x23};
    static std::uint8_t c16[32] = {0x87,0xbd,0xa1,0x36,0xef,0x60,0x9a,0x6a,0xb5,0x38,0xee,0x4e,0x73,0x31,0x23,0xe7,0x2e,0xcd,0x29,0x6c,0x7b,0x94,0xa8,0x12,0x90,0x45,0xf3,0xd9,0x5b,0xc7,0x55,0xb7};
    sm2_fp_from_bytes(a, a16);
    sm2_fp_from_bytes(b, b16);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a17[32] = {0x67,0x5e,0xde,0xce,0xb4,0x57,0x69,0x21,0xb0,0x35,0xe1,0xc8,0x5b,0x26,0x4d,0xe5,0x94,0x25,0x4c,0xbd,0x8d,0x4e,0x9d,0x66,0x95,0x5c,0xab,0x89,0xff,0x9b,0x21,0x59};
    static std::uint8_t b17[32] = {0xee,0x96,0xb3,0x79,0x65,0x47,0x57,0xe0,0x80,0xdc,0xdf,0xf1,0x55,0x94,0x07,0x4b,0xc4,0x63,0x7f,0x55,0xfb,0x9f,0xbc,0x11,0x0d,0xcf,0xc1,0xb0,0xe2,0x72,0xe4,0x83};
    static std::uint8_t c17[32] = {0x78,0xc8,0x2b,0x54,0x4f,0x10,0x11,0x41,0x2f,0x59,0x01,0xd7,0x05,0x92,0x46,0x99,0xcf,0xc1,0xcd,0x66,0x91,0xae,0xe1,0x56,0x87,0x8c,0xe9,0xd9,0x1d,0x28,0x3c,0xd5};
    sm2_fp_from_bytes(a, a17);
    sm2_fp_from_bytes(b, b17);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a18[32] = {0x17,0x8e,0xb7,0xb4,0xb2,0x8a,0xd6,0xd7,0xaf,0xb0,0xfe,0x0d,0x72,0x92,0x53,0xce,0xad,0x1a,0x05,0xf4,0x67,0xa3,0xe9,0x40,0x22,0x9f,0x63,0x23,0x1b,0xc0,0x39,0x31};
    static std::uint8_t b18[32] = {0x0c,0xba,0x93,0xb0,0x34,0x1c,0xd3,0xe7,0x16,0xfa,0x34,0xa1,0xab,0x79,0xb6,0xdd,0x7f,0xb8,0x47,0xdd,0x2a,0x92,0xf0,0xdd,0xa2,0x4c,0x2f,0x3f,0x3f,0x52,0x2f,0xa7};
    static std::uint8_t c18[32] = {0x0a,0xd4,0x24,0x04,0x7e,0x6e,0x02,0xf0,0x98,0xb6,0xc9,0x6b,0xc7,0x18,0x9c,0xf1,0x2d,0x61,0xbe,0x17,0x3d,0x10,0xf8,0x62,0x80,0x53,0x33,0xe3,0xdc,0x6e,0x09,0x8a};
    sm2_fp_from_bytes(a, a18);
    sm2_fp_from_bytes(b, b18);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a19[32] = {0xd7,0xe6,0xac,0xfa,0xa7,0x88,0xfc,0x84,0xa4,0x29,0x1f,0xb9,0x05,0xb6,0x95,0x2b,0xbc,0x9a,0xf7,0x3d,0xee,0x43,0x48,0xd6,0xd6,0x77,0xd7,0xa6,0xfc,0xd9,0x74,0x07};
    static std::uint8_t b19[32] = {0xab,0xe7,0x23,0x16,0x98,0x27,0xbf,0x5a,0x45,0xd9,0x12,0x5d,0x28,0x1b,0x0c,0xd6,0x60,0xbb,0x05,0xd3,0x72,0xe2,0x01,0xfe,0xa6,0x22,0x1b,0xce,0x76,0xfb,0x7a,0xc0};
    static std::uint8_t c19[32] = {0x2b,0xff,0x89,0xe4,0x0f,0x61,0x3d,0x2a,0x5e,0x50,0x0d,0x5b,0xdd,0x9b,0x88,0x55,0x5b,0xdf,0xf1,0x6a,0x7b,0x61,0x46,0xd8,0x30,0x55,0xbb,0xd8,0x85,0xdd,0xf9,0x47};
    sm2_fp_from_bytes(a, a19);
    sm2_fp_from_bytes(b, b19);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a20[32] = {0x6c,0xf3,0xae,0xb0,0x3f,0x50,0x91,0x02,0x44,0xef,0xf9,0x73,0x0c,0xe2,0xbc,0x27,0x24,0x62,0xc1,0xd2,0x89,0x91,0x80,0x73,0x70,0xb4,0x01,0x46,0x71,0x27,0x15,0xe1};
    static std::uint8_t b20[32] = {0x61,0xc3,0x37,0xf3,0xe8,0xc3,0xbc,0x89,0x92,0x0b,0x8e,0xec,0xbc,0x02,0xb2,0xab,0x99,0x66,0xf8,0x1a,0x85,0x27,0xc5,0xe2,0xe1,0xcd,0xa1,0x4e,0x3a,0x8a,0xec,0xb4};
    static std::uint8_t c20[32] = {0x0b,0x30,0x76,0xbc,0x56,0x8c,0xd4,0x78,0xb2,0xe4,0x6a,0x86,0x50,0xe0,0x09,0x7b,0x8a,0xfb,0xc9,0xb8,0x04,0x69,0xba,0x90,0x8e,0xe6,0x5f,0xf8,0x36,0x9c,0x29,0x2d};
    sm2_fp_from_bytes(a, a20);
    sm2_fp_from_bytes(b, b20);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a21[32] = {0xdf,0xa7,0xa5,0x25,0x52,0x67,0x69,0x85,0x59,0x3d,0xb2,0xa7,0x1b,0x89,0x66,0xa1,0x78,0xa0,0x3a,0x92,0x77,0x7c,0x21,0xd7,0x84,0xd4,0x47,0x19,0x6a,0x24,0x3f,0x08};
    static std::uint8_t b21[32] = {0x69,0x74,0xe7,0x5f,0x5f,0xe5,0x21,0x9e,0x17,0x5d,0xbd,0x94,0x1c,0xfd,0xe4,0x16,0xdb,0xda,0x47,0xae,0x10,0x80,0x76,0x3f,0xc2,0x89,0xf5,0xd4,0xd0,0xd8,0x37,0x84};
    static std::uint8_t c21[32] = {0x76,0x32,0xbd,0xc5,0xf2,0x82,0x47,0xe7,0x41,0xdf,0xf5,0x12,0xfe,0x8b,0x82,0x8a,0x9c,0xc5,0xf2,0xe4,0x66,0xfb,0xab,0x97,0xc2,0x4a,0x51,0x44,0x99,0x4c,0x07,0x84};
    sm2_fp_from_bytes(a, a21);
    sm2_fp_from_bytes(b, b21);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a22[32] = {0xab,0xdf,0xc0,0x11,0x90,0x61,0x4a,0xd7,0xe2,0x57,0xf8,0xa5,0x80,0x0c,0x5f,0x22,0x09,0x8f,0x0b,0xbe,0x9a,0xac,0x72,0x25,0xa1,0xd0,0x72,0x37,0x4e,0xa1,0x70,0x12};
    static std::uint8_t b22[32] = {0xed,0xb1,0x91,0x3b,0x41,0x26,0x46,0xaa,0x24,0x2a,0x68,0xfd,0xfa,0xdb,0xa5,0x02,0x82,0x09,0x61,0x90,0xed,0xc1,0x9d,0xb7,0x98,0xbe,0x21,0xc9,0x32,0x75,0xe9,0xdd};
    static std::uint8_t c22[32] = {0xbe,0x2e,0x2e,0xd5,0x4f,0x3b,0x04,0x2d,0xbe,0x2d,0x8f,0xa7,0x85,0x30,0xba,0x1f,0x87,0x85,0xaa,0x2c,0xac,0xea,0xd4,0x6f,0x09,0x12,0x50,0x6e,0x1c,0x2b,0x86,0x34};
    sm2_fp_from_bytes(a, a22);
    sm2_fp_from_bytes(b, b22);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a23[32] = {0x3a,0xf7,0xaf,0x76,0xa5,0xd7,0xd7,0x79,0xf3,0x70,0xfb,0xcb,0x01,0x16,0xf4,0x3b,0x96,0x74,0x89,0xf6,0x78,0xbb,0x95,0xc5,0x32,0x99,0xf4,0xaf,0x19,0x29,0x62,0xe7};
    static std::uint8_t b23[32] = {0x6b,0x1b,0x43,0x2e,0x8f,0xa4,0x4c,0x0b,0xaa,0x8b,0xb7,0x04,0x18,0x83,0x4c,0xc3,0xbd,0x28,0xb9,0xea,0x81,0x4b,0x77,0xba,0x49,0x7a,0xff,0xc2,0x37,0x03,0x3f,0xed};
    static std::uint8_t c23[32] = {0xcf,0xdc,0x6c,0x47,0x16,0x33,0x8b,0x6e,0x48,0xe5,0x44,0xc6,0xe8,0x93,0xa7,0x77,0xd9,0x4b,0xd0,0x0a,0xf7,0x70,0x1e,0x0b,0xe9,0x1e,0xf4,0xec,0xe2,0x26,0x22,0xf9};
    sm2_fp_from_bytes(a, a23);
    sm2_fp_from_bytes(b, b23);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a24[32] = {0xf0,0xb0,0x06,0xd1,0x34,0x3e,0x97,0x89,0xfb,0x6e,0x70,0x67,0xf5,0x69,0xa4,0x2a,0x86,0x4e,0xf1,0xfd,0x50,0xf2,0x30,0xf3,0xd2,0xb0,0xcd,0x63,0x7a,0xf4,0x04,0x96};
    static std::uint8_t b24[32] = {0x0d,0xb0,0x02,0x84,0x2f,0xa4,0x8d,0x7f,0x6f,0xc4,0x2b,0x32,0x0f,0x18,0x78,0x42,0x0b,0x4a,0xea,0xb4,0x38,0xc1,0x21,0xef,0xc1,0x68,0x85,0xf7,0x4c,0xa2,0xee,0x11};
    static std::uint8_t c24[32] = {0xe3,0x00,0x04,0x4d,0x04,0x9a,0x0a,0x0a,0x8b,0xaa,0x45,0x35,0xe6,0x51,0x2b,0xe8,0x7b,0x04,0x07,0x49,0x18,0x31,0x0f,0x04,0x11,0x48,0x47,0x6c,0x2e,0x51,0x16,0x85};
    sm2_fp_from_bytes(a, a24);
    sm2_fp_from_bytes(b, b24);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a25[32] = {0xca,0x12,0xce,0x6a,0x14,0x43,0x10,0x0d,0x07,0x2f,0x7a,0xa6,0x79,0x31,0xf0,0x0a,0xcb,0xcd,0x04,0x91,0x97,0x20,0xc8,0x8d,0xa5,0xad,0x1b,0xa9,0x5d,0xce,0x36,0x22};
    static std::uint8_t b25[32] = {0x58,0x5e,0x0d,0xc8,0x39,0xa7,0x9f,0x50,0x58,0xd1,0x10,0xd8,0xf0,0x97,0x06,0x91,0x74,0x79,0x75,0x1b,0x3e,0xda,0xb6,0x16,0xb0,0x3b,0x32,0x56,0xd3,0xc7,0xc7,0x99};
    static std::uint8_t c25[32] = {0x71,0xb4,0xc0,0xa1,0xda,0x9b,0x70,0xbc,0xae,0x5e,0x69,0xcd,0x88,0x9a,0xe9,0x79,0x57,0x53,0x8f,0x76,0x58,0x46,0x12,0x76,0xf5,0x71,0xe9,0x52,0x8a,0x06,0x6e,0x89};
    sm2_fp_from_bytes(a, a25);
    sm2_fp_from_bytes(b, b25);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a26[32] = {0xa4,0x9c,0xd7,0x6e,0x12,0x4c,0x99,0xcc,0x4e,0x67,0xb0,0x18,0x8d,0x8b,0x0d,0x36,0x2c,0x9a,0xa1,0xb9,0x48,0x1a,0xa9,0x12,0xae,0xbb,0xea,0x63,0xdd,0x58,0xb3,0xa1};
    static std::uint8_t b26[32] = {0x80,0xf6,0xc0,0xf9,0x9b,0xfc,0xf5,0xac,0x4f,0x67,0x29,0x39,0x40,0x29,0xca,0x5c,0x44,0x86,0x49,0x20,0x68,0x9a,0xc3,0x9b,0x52,0x22,0xd2,0x03,0xc2,0x70,0xbd,0xde};
    static std::uint8_t c26[32] = {0x23,0xa6,0x16,0x74,0x76,0x4f,0xa4,0x1f,0xff,0x00,0x86,0xdf,0x4d,0x61,0x42,0xd9,0xe8,0x14,0x58,0x98,0xdf,0x7f,0xe5,0x77,0x5c,0x99,0x18,0x60,0x1a,0xe7,0xf5,0xc3};
    sm2_fp_from_bytes(a, a26);
    sm2_fp_from_bytes(b, b26);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a27[32] = {0xfa,0x69,0x37,0xe1,0x4b,0xac,0xa0,0xd2,0x82,0xb9,0x1f,0x8c,0x75,0x74,0x34,0x2f,0xa3,0xff,0xd7,0x91,0xa2,0xaf,0xf1,0xa0,0xe0,0x2b,0xac,0xde,0xa9,0xfd,0x0e,0xcb};
    static std::uint8_t b27[32] = {0x5a,0x47,0xf3,0x87,0x93,0xe2,0xed,0xa1,0xcd,0x9c,0x1b,0x8a,0x2c,0xe7,0x7f,0x0e,0x82,0x63,0x43,0xb1,0x70,0x9a,0x16,0x1f,0xdf,0x88,0x04,0x43,0x09,0xb2,0x88,0x6d};
    static std::uint8_t c27[32] = {0xa0,0x21,0x44,0x59,0xb7,0xc9,0xb3,0x30,0xb5,0x1d,0x04,0x02,0x48,0x8c,0xb5,0x21,0x21,0x9c,0x93,0xe0,0x32,0x15,0xdb,0x81,0x00,0xa3,0xa8,0x9b,0xa0,0x4a,0x86,0x5e};
    sm2_fp_from_bytes(a, a27);
    sm2_fp_from_bytes(b, b27);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a28[32] = {0xbf,0xf4,0xdd,0x4a,0x24,0x55,0xf0,0x87,0x39,0xda,0xab,0x87,0xe0,0x05,0x1b,0x11,0x43,0x97,0x4a,0x24,0xb4,0xcb,0xa1,0xc3,0x3e,0x22,0xba,0xdc,0x22,0x47,0x0f,0x7e};
    static std::uint8_t b28[32] = {0x7e,0x7b,0xe2,0xca,0x16,0x2c,0xe0,0x51,0x15,0x75,0x17,0x94,0x4b,0xbb,0xe6,0x20,0xbf,0x31,0x54,0xa3,0x2a,0x48,0xe2,0x39,0x54,0xe1,0x58,0xaf,0xd8,0xfa,0x5d,0x2b};
    static std::uint8_t c28[32] = {0x41,0x78,0xfa,0x80,0x0e,0x29,0x10,0x36,0x24,0x65,0x93,0xf3,0x94,0x49,0x34,0xf0,0x84,0x65,0xf5,0x81,0x8a,0x82,0xbf,0x89,0xe9,0x41,0x62,0x2c,0x49,0x4c,0xb2,0x53};
    sm2_fp_from_bytes(a, a28);
    sm2_fp_from_bytes(b, b28);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a29[32] = {0xd5,0xc4,0x7c,0x50,0xb7,0x81,0x91,0x72,0x34,0x7a,0xec,0x0e,0x30,0x8d,0x42,0x7f,0xd3,0xfb,0xee,0x3c,0x6d,0xc4,0xf3,0x94,0x0c,0x1a,0x35,0x82,0x73,0x2a,0x8a,0x25};
    static std::uint8_t b29[32] = {0x7c,0x27,0x83,0xaa,0x19,0x41,0xbf,0x52,0x89,0xbb,0xef,0xbf,0xb4,0xef,0x29,0x47,0xe4,0x24,0xa9,0x70,0x86,0x39,0x19,0xde,0xdc,0xcf,0xf5,0x29,0x5d,0xa4,0xb4,0xe2};
    static std::uint8_t c29[32] = {0x59,0x9c,0xf8,0xa6,0x9e,0x3f,0xd2,0x1f,0xaa,0xbe,0xfc,0x4e,0x7b,0x9e,0x19,0x37,0xef,0xd7,0x44,0xcb,0xe7,0x8b,0xd9,0xb5,0x2f,0x4a,0x40,0x59,0x15,0x85,0xd5,0x43};
    sm2_fp_from_bytes(a, a29);
    sm2_fp_from_bytes(b, b29);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a30[32] = {0x2f,0x0f,0x0f,0xbd,0xb9,0x40,0x4e,0x9d,0xf9,0x62,0x70,0x34,0x96,0xd8,0x1d,0xdd,0x9d,0x2d,0x56,0xdc,0xb0,0x82,0x11,0x82,0x21,0x6c,0xfb,0x02,0xd1,0x9e,0xc6,0xe2};
    static std::uint8_t b30[32] = {0x14,0x67,0xe1,0x0c,0xa3,0xe5,0x91,0x3c,0xe7,0x85,0xe6,0x7e,0xdf,0x4a,0xd2,0x92,0x8c,0x17,0x53,0x71,0x19,0xc5,0x6c,0x95,0x76,0x1c,0xcd,0x98,0x32,0xe5,0xda,0x5c};
    static std::uint8_t c30[32] = {0x1a,0xa7,0x2e,0xb1,0x15,0x5a,0xbd,0x61,0x11,0xdc,0x89,0xb5,0xb7,0x8d,0x4b,0x4b,0x11,0x16,0x03,0x6b,0x96,0xbc,0xa4,0xec,0xab,0x50,0x2d,0x6a,0x9e,0xb8,0xec,0x86};
    sm2_fp_from_bytes(a, a30);
    sm2_fp_from_bytes(b, b30);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a31[32] = {0x46,0x84,0xc3,0x32,0x7d,0x07,0x38,0xaf,0xaf,0x37,0xfa,0x79,0x1c,0x94,0x5d,0x36,0x57,0x9d,0x3b,0x8e,0x18,0x80,0xea,0x51,0xeb,0x26,0x4a,0xec,0xd4,0xe7,0x58,0x8c};
    static std::uint8_t b31[32] = {0x0f,0x7a,0x54,0x0a,0x9f,0x56,0xd4,0xb8,0xb3,0x0c,0x25,0x6d,0x6a,0x16,0x63,0x37,0xa4,0x9e,0x20,0x2e,0x13,0xcb,0x81,0x80,0x4a,0xbc,0xe5,0xb4,0x69,0x1a,0x8f,0x49};
    static std::uint8_t c31[32] = {0x37,0x0a,0x6f,0x27,0xdd,0xb0,0x63,0xf6,0xfc,0x2b,0xd5,0x0b,0xb2,0x7d,0xf9,0xfe,0xb2,0xff,0x1b,0x60,0x04,0xb5,0x68,0xd1,0xa0,0x69,0x65,0x38,0x6b,0xcc,0xc9,0x43};
    sm2_fp_from_bytes(a, a31);
    sm2_fp_from_bytes(b, b31);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a32[32] = {0x9b,0x18,0x7a,0x85,0xbe,0x18,0xf4,0x70,0x10,0xa1,0x2f,0x04,0x19,0x8e,0x1b,0x49,0x1a,0x43,0x88,0xff,0x5f,0x22,0xa2,0xb2,0x0a,0x55,0xc9,0xaf,0x17,0xf5,0xe2,0xf5};
    static std::uint8_t b32[32] = {0x0f,0xdd,0xba,0x56,0x15,0xd3,0x73,0x39,0x57,0x93,0x88,0x07,0x5c,0xaf,0x69,0x68,0xfc,0x5e,0x9e,0xcf,0xb6,0x64,0xd1,0x41,0xeb,0x74,0x1d,0x30,0xd7,0x86,0x70,0xc4};
    static std::uint8_t c32[32] = {0x8b,0x3a,0xc0,0x2f,0xa8,0x45,0x81,0x36,0xb9,0x0d,0xa6,0xfc,0xbc,0xde,0xb1,0xe0,0x1d,0xe4,0xea,0x2f,0xa8,0xbd,0xd1,0x70,0x1e,0xe1,0xac,0x7e,0x40,0x6f,0x72,0x31};
    sm2_fp_from_bytes(a, a32);
    sm2_fp_from_bytes(b, b32);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a33[32] = {0x2d,0x94,0xc8,0xc2,0x30,0xad,0x60,0xe6,0x03,0x9a,0x07,0x25,0xbd,0x9b,0x64,0x2d,0xea,0xf0,0x8f,0xd7,0x08,0x3e,0xb2,0xaf,0xa0,0x14,0xe3,0x9c,0xa1,0xc3,0x7f,0x1f};
    static std::uint8_t b33[32] = {0xf5,0x73,0xe9,0xd5,0xa0,0x9e,0x86,0x8c,0xaa,0xcc,0x96,0x3b,0x94,0xad,0x0e,0x26,0x02,0x68,0x88,0x50,0x3d,0xd5,0x92,0x42,0xae,0xec,0xcd,0xb6,0xf2,0x93,0xa8,0xdc};
    static std::uint8_t c33[32] = {0x38,0x20,0xde,0xeb,0x90,0x0e,0xda,0x59,0x58,0xcd,0x70,0xea,0x28,0xee,0x56,0x07,0xe8,0x88,0x07,0x85,0xca,0x69,0x20,0x6d,0xf1,0x28,0x15,0xe5,0xaf,0x2f,0xd6,0x42};
    sm2_fp_from_bytes(a, a33);
    sm2_fp_from_bytes(b, b33);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a34[32] = {0x2e,0x02,0x8f,0x8b,0xb3,0xbf,0xec,0xe2,0x29,0x4e,0x79,0x4a,0xe6,0x72,0xf8,0xe3,0x0c,0xf2,0x77,0x83,0xee,0x2c,0x40,0x67,0xa7,0x46,0xf8,0xb0,0xd9,0xed,0x32,0x27};
    static std::uint8_t b34[32] = {0x6f,0xf9,0x75,0xba,0x95,0x6c,0x23,0x8d,0x5b,0xe5,0x81,0x43,0x21,0xed,0x9f,0x06,0xb9,0x18,0x86,0xcc,0xfe,0x8a,0xf6,0x2c,0xb9,0x9b,0xbd,0x3f,0xda,0x0f,0x3e,0xe3};
    static std::uint8_t c34[32] = {0xbe,0x09,0x19,0xd0,0x1e,0x53,0xc9,0x54,0xcd,0x68,0xf8,0x07,0xc4,0x85,0x59,0xdc,0x53,0xd9,0xf0,0xb5,0xef,0xa1,0x4a,0x3b,0xed,0xab,0x3b,0x70,0xff,0xdd,0xf3,0x43};
    sm2_fp_from_bytes(a, a34);
    sm2_fp_from_bytes(b, b34);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a35[32] = {0x0a,0x92,0x5e,0x56,0xe5,0x7c,0xe1,0x7e,0xcd,0xeb,0x36,0xdd,0x7c,0xc6,0x46,0x9b,0xd4,0xef,0xfe,0x9c,0x02,0x32,0x86,0xe2,0x77,0x90,0xe7,0xe6,0xfe,0x7f,0xe3,0x2e};
    static std::uint8_t b35[32] = {0xd4,0x28,0xb4,0x63,0xd3,0x7a,0x5b,0x51,0xcb,0x43,0xe5,0x22,0x28,0xe3,0x0e,0xac,0x87,0x57,0xdd,0x70,0x30,0x38,0xf9,0x06,0x65,0x0c,0xbd,0x30,0x92,0x10,0x1f,0x2b};
    static std::uint8_t c35[32] = {0x36,0x69,0xa9,0xf2,0x12,0x02,0x86,0x2d,0x02,0xa7,0x51,0xbb,0x53,0xe3,0x37,0xef,0x4d,0x98,0x21,0x2a,0xd1,0xf9,0x8d,0xdd,0x12,0x84,0x2a,0xb6,0x6c,0x6f,0xc4,0x02};
    sm2_fp_from_bytes(a, a35);
    sm2_fp_from_bytes(b, b35);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a36[32] = {0x9c,0x97,0xe4,0xfb,0x69,0xbd,0x87,0xe1,0xbb,0xfb,0x29,0x61,0x85,0xd7,0xb4,0x38,0x81,0xa4,0x6b,0x59,0x09,0xec,0x4f,0xa3,0x31,0x45,0xe6,0xbe,0x5f,0x46,0x5c,0xe0};
    static std::uint8_t b36[32] = {0x56,0xbc,0x8e,0x9a,0x04,0xdc,0xdb,0x20,0x50,0x5f,0xe6,0x18,0xf7,0x50,0x98,0xba,0x8b,0x52,0xc1,0xf0,0xb8,0x59,0xd2,0xd8,0xd4,0x43,0x46,0xb0,0x72,0x63,0x0e,0x2e};
    static std::uint8_t c36[32] = {0x45,0xdb,0x56,0x61,0x64,0xe0,0xac,0xc1,0x6b,0x9b,0x43,0x48,0x8e,0x87,0x1b,0x7d,0xf6,0x51,0xa9,0x68,0x51,0x92,0x7c,0xca,0x5d,0x02,0xa0,0x0d,0xec,0xe3,0x4e,0xb2};
    sm2_fp_from_bytes(a, a36);
    sm2_fp_from_bytes(b, b36);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a37[32] = {0xce,0x13,0x64,0x16,0x42,0x8c,0xfb,0x94,0x65,0xeb,0xe2,0x45,0xfc,0xc9,0xf8,0x05,0x5e,0x22,0x90,0x46,0x50,0x2e,0x92,0x05,0x20,0xdf,0x99,0x67,0xb9,0x91,0xb0,0x7c};
    static std::uint8_t b37[32] = {0xe9,0x73,0xdf,0xb8,0xce,0xab,0xfd,0x64,0xa3,0x00,0x99,0xfe,0xd7,0xf1,0xdd,0xb4,0xf2,0x17,0xa9,0x2b,0x65,0x23,0x6b,0xb7,0x21,0xfd,0xed,0x84,0x7b,0x5c,0x24,0xe7};
    static std::uint8_t c37[32] = {0xe4,0x9f,0x84,0x5c,0x73,0xe0,0xfe,0x2f,0xc2,0xeb,0x48,0x47,0x24,0xd8,0x1a,0x50,0x6c,0x0a,0xe7,0x19,0xeb,0x0b,0x26,0x4e,0xfe,0xe1,0xab,0xe3,0x3e,0x35,0x8b,0x94};
    sm2_fp_from_bytes(a, a37);
    sm2_fp_from_bytes(b, b37);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a38[32] = {0xc2,0xc6,0xd6,0x86,0xf9,0x14,0x42,0xd1,0x78,0xf9,0xd7,0xaf,0x32,0x57,0xaf,0xf7,0xad,0x25,0x44,0x6d,0x78,0xf5,0xa5,0x81,0x36,0x61,0xd0,0x20,0xb8,0x2b,0x47,0x2b};
    static std::uint8_t b38[32] = {0x57,0x33,0xe6,0x70,0xe1,0x35,0xfb,0x7d,0xb7,0x04,0xa2,0x6b,0xae,0xd9,0xcb,0x62,0xbd,0xef,0x37,0xce,0xbd,0xa0,0xd9,0xa8,0x3b,0x38,0xce,0x21,0x8e,0xaf,0xf9,0xbf};
    static std::uint8_t c38[32] = {0x6b,0x92,0xf0,0x16,0x17,0xde,0x47,0x53,0xc1,0xf5,0x35,0x43,0x83,0x7d,0xe4,0x94,0xef,0x36,0x0c,0x9e,0xbb,0x54,0xcb,0xd8,0xfb,0x29,0x01,0xff,0x29,0x7b,0x4d,0x6c};
    sm2_fp_from_bytes(a, a38);
    sm2_fp_from_bytes(b, b38);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a39[32] = {0x6e,0x5a,0xa6,0x72,0xb4,0x41,0x21,0xf5,0xbd,0xaa,0x78,0xa5,0x49,0x2f,0x70,0x5e,0x14,0x23,0x20,0xe8,0xa4,0x04,0x56,0x14,0xc3,0xd9,0x2a,0x87,0x52,0x04,0x0f,0x73};
    static std::uint8_t b39[32] = {0xd9,0x93,0x92,0xd6,0xe2,0xa3,0x11,0x3b,0x7f,0xa9,0xba,0xd5,0x81,0xcc,0x02,0x25,0x0a,0x41,0xed,0xd5,0xa7,0x25,0x64,0xf8,0xce,0xc4,0xe6,0x39,0x1d,0x9f,0xcf,0xf9};
    static std::uint8_t c39[32] = {0x94,0xc7,0x13,0x9a,0xd1,0x9e,0x10,0xba,0x3e,0x00,0xbd,0xcf,0xc7,0x63,0x6e,0x39,0x09,0xe1,0x33,0x11,0xfc,0xde,0xf1,0x1c,0xf5,0x14,0x44,0x4e,0x34,0x64,0x3f,0x79};
    sm2_fp_from_bytes(a, a39);
    sm2_fp_from_bytes(b, b39);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a40[32] = {0x98,0xe8,0x24,0xdb,0xc5,0x20,0x0f,0xde,0xe6,0x39,0x5f,0x5f,0x83,0x2b,0xf2,0x7b,0x5a,0x55,0x7e,0x53,0x7b,0x7f,0x5b,0x10,0x75,0xae,0x51,0x44,0xde,0xb4,0xca,0x5e};
    static std::uint8_t b40[32] = {0x0f,0x42,0x7a,0x14,0xf4,0xf0,0x9f,0xa7,0xa2,0xf4,0xf7,0x01,0xe0,0x65,0x5b,0xa6,0x57,0x4b,0xc6,0x47,0x87,0x37,0x40,0x10,0x14,0xdf,0x0f,0xf6,0x8c,0xd8,0xd7,0x3a};
    static std::uint8_t c40[32] = {0x89,0xa5,0xaa,0xc6,0xd0,0x2f,0x70,0x37,0x43,0x44,0x68,0x5d,0xa2,0xc6,0x96,0xd5,0x03,0x09,0xb8,0x0b,0xf4,0x48,0x1b,0x00,0x60,0xcf,0x41,0x4e,0x51,0xdb,0xf3,0x24};
    sm2_fp_from_bytes(a, a40);
    sm2_fp_from_bytes(b, b40);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a41[32] = {0x8f,0x31,0xf5,0xe7,0xda,0xc4,0x54,0x64,0xc1,0x1c,0xaa,0x62,0x01,0x05,0x43,0x26,0x6c,0x03,0x4c,0x36,0x69,0xe0,0x11,0x18,0x2b,0x8f,0xf2,0x57,0x29,0x86,0x77,0xc7};
    static std::uint8_t b41[32] = {0xc2,0x4f,0x41,0x32,0x5e,0xc4,0x76,0x20,0x68,0x8f,0xcf,0x60,0xc2,0xa1,0xf0,0x2b,0xf2,0xe2,0xca,0x86,0xd1,0xd7,0xdb,0x34,0xe9,0x8d,0x75,0x47,0x80,0x22,0x71,0xac};
    static std::uint8_t c41[32] = {0xcc,0xe2,0xb4,0xb4,0x7b,0xff,0xde,0x44,0x58,0x8c,0xdb,0x01,0x3e,0x63,0x52,0xfa,0x79,0x20,0x81,0xae,0x98,0x08,0x35,0xe4,0x42,0x02,0x7d,0x0f,0xa9,0x64,0x06,0x1a};
    sm2_fp_from_bytes(a, a41);
    sm2_fp_from_bytes(b, b41);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a42[32] = {0x97,0x41,0x7a,0xa1,0x46,0x2e,0x5c,0x15,0xae,0xfc,0x99,0x11,0x8c,0x55,0x89,0x4d,0xf8,0xdf,0x50,0xef,0xd3,0x3a,0x8f,0xa3,0x2b,0x9c,0xa7,0xfe,0x50,0xd0,0x5b,0xd7};
    static std::uint8_t b42[32] = {0x27,0xe2,0x42,0x29,0x45,0x6d,0xd8,0x02,0x4e,0x32,0x6c,0x9a,0x0b,0xef,0xae,0x4f,0xd6,0x0f,0xca,0x68,0xbc,0x44,0x4b,0x68,0xeb,0x44,0x80,0x8b,0x53,0x57,0x38,0x01};
    static std::uint8_t c42[32] = {0x6f,0x5f,0x38,0x78,0x00,0xc0,0x84,0x13,0x60,0xca,0x2c,0x77,0x80,0x65,0xda,0xfe,0x22,0xcf,0x86,0x87,0x16,0xf6,0x44,0x3a,0x40,0x58,0x27,0x72,0xfd,0x79,0x23,0xd6};
    sm2_fp_from_bytes(a, a42);
    sm2_fp_from_bytes(b, b42);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a43[32] = {0x98,0xa2,0x9b,0xc1,0xe7,0x2b,0x1c,0xdd,0xca,0x0c,0x39,0xb8,0xc3,0x84,0x9c,0xa0,0xd9,0x41,0x92,0xda,0xe8,0x82,0x05,0xec,0x4c,0xbd,0xc9,0x04,0xed,0xf7,0xbe,0x62};
    static std::uint8_t b43[32] = {0xd1,0xcf,0x8b,0x85,0x81,0x1c,0xb0,0x13,0xee,0x37,0x39,0x85,0xa5,0x13,0x62,0x89,0x98,0x1b,0x06,0xf0,0x63,0xe7,0x0c,0x13,0x19,0x79,0xa5,0x49,0x94,0xa9,0x97,0xc6};
    static std::uint8_t c43[32] = {0xc6,0xd3,0x10,0x3b,0x66,0x0e,0x6c,0xc9,0xdb,0xd5,0x00,0x33,0x1e,0x71,0x3a,0x17,0x41,0x26,0x8b,0xe9,0x84,0x9a,0xf9,0xda,0x33,0x44,0x23,0xbb,0x59,0x4e,0x26,0x9b};
    sm2_fp_from_bytes(a, a43);
    sm2_fp_from_bytes(b, b43);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a44[32] = {0x54,0x4e,0x31,0x7f,0x22,0xe7,0x16,0xe3,0xa3,0x11,0x99,0x02,0x3d,0x8a,0x6c,0x59,0xc8,0x8b,0x66,0xa1,0xc3,0x4a,0x87,0x91,0x53,0x2e,0xd9,0x0a,0xd4,0x86,0xfd,0xf1};
    static std::uint8_t b44[32] = {0x21,0x21,0x21,0x4e,0x20,0x2b,0x5e,0xd1,0xdd,0xfa,0x97,0xa5,0x55,0x09,0x47,0x20,0x4a,0x29,0xc6,0x2c,0x94,0xfc,0x01,0xa5,0x50,0x9f,0x16,0x2d,0x08,0x2e,0xa5,0x21};
    static std::uint8_t c44[32] = {0x33,0x2d,0x10,0x31,0x02,0xbb,0xb8,0x11,0xc5,0x17,0x01,0x5c,0xe8,0x81,0x25,0x39,0x7e,0x61,0xa0,0x75,0x2e,0x4e,0x85,0xec,0x02,0x8f,0xc2,0xdd,0xcc,0x58,0x58,0xd0};
    sm2_fp_from_bytes(a, a44);
    sm2_fp_from_bytes(b, b44);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a45[32] = {0x31,0xda,0x1e,0xc5,0xc2,0x0f,0x7e,0xbd,0x70,0x8f,0x48,0xaa,0xc7,0xb0,0x52,0x9b,0xbe,0x38,0x79,0x51,0x8d,0x33,0x05,0xc4,0xd6,0x4a,0xcf,0xcd,0xf4,0x11,0xcc,0xc0};
    static std::uint8_t b45[32] = {0xff,0x57,0x41,0x1b,0xde,0xca,0xc0,0x6c,0xdb,0xa7,0xb1,0xc5,0xf6,0xce,0xaa,0xba,0xf1,0x78,0xe6,0x7c,0xd8,0xc2,0xf1,0xd0,0xfd,0x5e,0x6e,0xa4,0xbb,0x5e,0x2d,0x01};
    static std::uint8_t c45[32] = {0x32,0x82,0xdd,0xa8,0xe3,0x44,0xbe,0x50,0x94,0xe7,0x96,0xe4,0xd0,0xe1,0xa7,0xe0,0xcc,0xbf,0x92,0xd3,0xb4,0x70,0x13,0xf4,0xd8,0xec,0x61,0x29,0x38,0xb3,0x9f,0xbe};
    sm2_fp_from_bytes(a, a45);
    sm2_fp_from_bytes(b, b45);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a46[32] = {0x6f,0xdb,0x6d,0xbf,0x9c,0xe9,0xa1,0x6f,0x6a,0xed,0xa8,0x06,0x79,0x8f,0xd9,0x56,0x70,0x14,0xb1,0x94,0x1d,0x9e,0x85,0x7a,0xcc,0x59,0xe6,0x8d,0xa1,0xcc,0xf9,0xf3};
    static std::uint8_t b46[32] = {0x27,0xa7,0x7b,0xfe,0x44,0xe3,0x4e,0x72,0x41,0x2f,0xef,0x86,0x2b,0xbb,0xa5,0xcc,0x64,0x42,0x9a,0x36,0x94,0xe4,0x5f,0xc2,0x52,0x4e,0xa9,0x5a,0xd7,0xbb,0x3f,0xc5};
    static std::uint8_t c46[32] = {0x48,0x33,0xf1,0xc1,0x58,0x06,0x52,0xfd,0x29,0xbd,0xb8,0x80,0x4d,0xd4,0x33,0x8a,0x0b,0xd2,0x17,0x5d,0x88,0xba,0x25,0xb8,0x7a,0x0b,0x3d,0x32,0xca,0x11,0xba,0x2e};
    sm2_fp_from_bytes(a, a46);
    sm2_fp_from_bytes(b, b46);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a47[32] = {0x8c,0x51,0x08,0x90,0x12,0x35,0x28,0xbe,0x7b,0xd0,0x48,0xb9,0x81,0x3b,0xe6,0xc6,0x9c,0x36,0x91,0x90,0x5a,0xc6,0xd1,0x78,0x78,0x3b,0x4e,0xdb,0x39,0x4e,0x41,0xe1};
    static std::uint8_t b47[32] = {0x55,0xd2,0xaf,0x4a,0x46,0xc4,0x1d,0x3f,0xc8,0x46,0xfe,0xbf,0x33,0xff,0xfd,0x50,0xa3,0xc4,0x08,0x37,0x47,0xfa,0x04,0x95,0x99,0x2b,0xa3,0x54,0x4e,0xd1,0x18,0x8f};
    static std::uint8_t c47[32] = {0x36,0x7e,0x59,0x45,0xcb,0x71,0x0b,0x7e,0xb3,0x89,0x49,0xfa,0x4d,0x3b,0xe9,0x75,0xf8,0x72,0x89,0x59,0x12,0xcc,0xcc,0xe2,0xdf,0x0f,0xab,0x86,0xea,0x7d,0x29,0x52};
    sm2_fp_from_bytes(a, a47);
    sm2_fp_from_bytes(b, b47);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a48[32] = {0x5d,0x8d,0x7c,0xf6,0xd7,0xe0,0x60,0xef,0xce,0xbe,0xf9,0xad,0xf2,0x35,0x99,0x10,0xc9,0x82,0xb9,0x6b,0x2a,0xe6,0x8e,0xce,0x7f,0x93,0x27,0xd5,0x2a,0xbf,0x26,0xff};
    static std::uint8_t b48[32] = {0x7c,0xbd,0xa0,0x10,0x11,0x9d,0x8a,0x95,0xa6,0x34,0x87,0xf8,0xf1,0xb4,0x4e,0x7e,0x66,0x28,0x31,0xb5,0x5a,0x47,0xd5,0xa0,0x33,0x81,0xc7,0x0f,0x5b,0x24,0x4d,0xbc};
    static std::uint8_t c48[32] = {0xe0,0xcf,0xdc,0xe5,0xc6,0x42,0xd6,0x5a,0x28,0x8a,0x71,0xb5,0x00,0x81,0x4a,0x92,0x63,0x5a,0x87,0xb4,0xd0,0x9e,0xb9,0x2f,0x4c,0x11,0x60,0xc5,0xcf,0x9a,0xd9,0x42};
    sm2_fp_from_bytes(a, a48);
    sm2_fp_from_bytes(b, b48);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a49[32] = {0xba,0xc4,0xa3,0x71,0x1a,0xb8,0xef,0x7a,0x36,0x04,0xd4,0x4b,0x11,0xf3,0xb9,0xe5,0x41,0x10,0x07,0xe2,0xfe,0x0a,0x00,0x04,0x0a,0xba,0x3a,0x38,0x52,0xc3,0x70,0xc7};
    static std::uint8_t b49[32] = {0x22,0x30,0x08,0xdc,0x7c,0x6d,0x44,0x46,0x87,0x99,0x7b,0x37,0xdc,0x12,0x0a,0x46,0x7c,0xb8,0x3d,0xf2,0x6d,0xab,0x10,0xc5,0x1c,0x51,0xba,0x4b,0x8e,0x24,0x05,0x7b};
    static std::uint8_t c49[32] = {0x98,0x94,0x9a,0x94,0x9e,0x4b,0xab,0x33,0xae,0x6b,0x59,0x13,0x35,0xe1,0xaf,0x9e,0xc4,0x57,0xc9,0xf0,0x90,0x5e,0xef,0x3e,0xee,0x68,0x7f,0xec,0xc4,0x9f,0x6b,0x4c};
    sm2_fp_from_bytes(a, a49);
    sm2_fp_from_bytes(b, b49);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a50[32] = {0x42,0x53,0xa7,0x6e,0x44,0x3f,0x43,0x04,0x2a,0xa9,0x3b,0x5e,0x37,0x34,0x01,0xc6,0x4d,0x1b,0x86,0x31,0x49,0x9b,0x72,0x0d,0x12,0xf9,0xe2,0xb0,0x05,0xe8,0x53,0x5b};
    static std::uint8_t b50[32] = {0x82,0xc2,0x4f,0xef,0xba,0xfe,0x35,0x2b,0x6d,0xce,0x5f,0x41,0x2a,0x71,0x55,0x06,0xb8,0xdc,0x47,0x24,0xbf,0x42,0x63,0x32,0x8e,0x96,0xd6,0x53,0xac,0xcb,0x84,0x6b};
    static std::uint8_t c50[32] = {0xbf,0x91,0x57,0x7d,0x89,0x41,0x0d,0xd8,0xbc,0xda,0xdc,0x1d,0x0c,0xc2,0xac,0xbf,0x94,0x3f,0x3f,0x0b,0x8a,0x59,0x0e,0xdb,0x84,0x63,0x0c,0x5c,0x59,0x1c,0xce,0xef};
    sm2_fp_from_bytes(a, a50);
    sm2_fp_from_bytes(b, b50);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a51[32] = {0x73,0x6e,0x53,0x1c,0x2d,0x03,0xc3,0x8c,0xca,0x75,0xe8,0xd0,0xa9,0x28,0xf2,0x17,0x01,0xf0,0x20,0x81,0x45,0xe1,0xa9,0x8f,0xe2,0xf4,0x59,0x93,0xa8,0xdf,0xcb,0x2b};
    static std::uint8_t b51[32] = {0x6d,0xb8,0x88,0x48,0xc2,0x48,0xfd,0x98,0x44,0xee,0x11,0xf3,0xf4,0x31,0x87,0x63,0x46,0x18,0x8d,0xbb,0x43,0x36,0x6e,0x34,0x1b,0xe9,0xf1,0x4e,0xf9,0xa2,0x8e,0x94};
    static std::uint8_t c51[32] = {0x05,0xb5,0xca,0xd3,0x6a,0xba,0xc5,0xf4,0x85,0x87,0xd6,0xdc,0xb4,0xf7,0x6a,0xb3,0xbb,0xd7,0x92,0xc6,0x02,0xab,0x3b,0x5b,0xc7,0x0a,0x68,0x44,0xaf,0x3d,0x3c,0x97};
    sm2_fp_from_bytes(a, a51);
    sm2_fp_from_bytes(b, b51);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a52[32] = {0x96,0x6c,0xda,0x1f,0x26,0xfd,0x9e,0x0e,0x8f,0xc1,0xd4,0x83,0x5b,0x39,0x46,0x54,0x0b,0x15,0xaa,0xdc,0x42,0xfc,0x37,0x47,0x75,0xe0,0xf0,0x02,0x4b,0x7f,0x74,0xe0};
    static std::uint8_t b52[32] = {0x18,0xce,0x37,0xff,0x97,0xf1,0x72,0x1e,0x9b,0xb9,0xbc,0x74,0x56,0x98,0x84,0x68,0x02,0x75,0x1b,0xea,0xa9,0x7c,0x82,0x18,0xa6,0x55,0x71,0x9a,0xe2,0x6c,0x15,0x65};
    static std::uint8_t c52[32] = {0x7d,0x9e,0xa2,0x1f,0x8f,0x0c,0x2b,0xef,0xf4,0x08,0x18,0x0f,0x04,0xa0,0xc1,0xec,0x08,0xa0,0x8e,0xf1,0x99,0x7f,0xb5,0x2e,0xcf,0x8b,0x7e,0x67,0x69,0x13,0x5f,0x7b};
    sm2_fp_from_bytes(a, a52);
    sm2_fp_from_bytes(b, b52);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a53[32] = {0x39,0xf8,0x7a,0xbf,0xc6,0x2d,0xf0,0xd2,0xad,0x53,0xd0,0x3c,0x21,0xb2,0x22,0x7f,0xca,0x5c,0xaf,0xf7,0xbb,0x30,0x9b,0x6e,0x96,0x55,0x4f,0x27,0x53,0xee,0x65,0x06};
    static std::uint8_t b53[32] = {0x0e,0x81,0x5b,0x30,0x47,0x78,0x08,0x02,0x26,0x9c,0xfe,0x44,0x49,0x62,0x6d,0xe4,0x1b,0xa0,0xd3,0x84,0x4c,0xa1,0x50,0x7a,0x46,0x7b,0x68,0x0a,0x47,0xbd,0xd0,0x2a};
    static std::uint8_t c53[32] = {0x2b,0x77,0x1f,0x8f,0x7e,0xb5,0xe8,0xd0,0x86,0xb6,0xd1,0xf7,0xd8,0x4f,0xb4,0x9b,0xae,0xbb,0xdc,0x73,0x6e,0x8f,0x4a,0xf4,0x4f,0xd9,0xe7,0x1d,0x0c,0x30,0x94,0xdc};
    sm2_fp_from_bytes(a, a53);
    sm2_fp_from_bytes(b, b53);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a54[32] = {0xae,0x0d,0xf1,0x34,0xa2,0x5a,0x7f,0xea,0xbe,0xa5,0x85,0x03,0x2c,0x09,0xff,0x8b,0xd8,0xb7,0x3b,0xec,0xda,0x57,0xeb,0x6d,0x53,0x7a,0x4b,0x0c,0xd3,0x40,0xe0,0xe5};
    static std::uint8_t b54[32] = {0x0e,0xc1,0xdc,0x58,0x8b,0xa5,0x68,0xa0,0x29,0x97,0x96,0x72,0x00,0xb5,0x92,0xe3,0x12,0xda,0x6d,0x1f,0xfb,0x63,0xa9,0x72,0xc1,0xd4,0xbc,0x71,0x3e,0xd4,0x28,0x0c};
    static std::uint8_t c54[32] = {0x9f,0x4c,0x14,0xdc,0x16,0xb5,0x17,0x4a,0x95,0x0d,0xee,0x91,0x2b,0x54,0x6c,0xa8,0xc5,0xdc,0xce,0xcc,0xde,0xf4,0x41,0xfa,0x91,0xa5,0x8e,0x9b,0x94,0x6c,0xb8,0xd9};
    sm2_fp_from_bytes(a, a54);
    sm2_fp_from_bytes(b, b54);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a55[32] = {0x02,0xb1,0xeb,0xcf,0xed,0xbd,0xc7,0x27,0xce,0x7f,0xfc,0x8e,0xf4,0xb9,0xbc,0x98,0x26,0xdd,0x8b,0xb9,0x79,0x5d,0x5b,0x67,0x3e,0xbc,0x6f,0xcf,0x52,0xe4,0x5f,0xf6};
    static std::uint8_t b55[32] = {0x1a,0x81,0xf8,0xb2,0xda,0xfc,0x56,0x99,0x4b,0x1a,0x68,0xf9,0x28,0xfa,0x99,0xd4,0x27,0x40,0x6a,0x9e,0xd9,0xff,0x44,0xc2,0x13,0xb5,0xf5,0x30,0x45,0xc7,0xb4,0x4e};
    static std::uint8_t c55[32] = {0xe8,0x2f,0xf3,0x1c,0x12,0xc1,0x70,0x8e,0x83,0x65,0x93,0x95,0xcb,0xbf,0x22,0xc3,0xff,0x9d,0x21,0x19,0x9f,0x5e,0x16,0xa6,0x2b,0x06,0x7a,0x9f,0x0d,0x1c,0xab,0xa7};
    sm2_fp_from_bytes(a, a55);
    sm2_fp_from_bytes(b, b55);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a56[32] = {0x48,0xe9,0xde,0xef,0xfe,0x39,0x66,0x33,0xb6,0x55,0x4c,0x2d,0x8f,0x6e,0xb8,0xe2,0x12,0x8f,0x47,0x41,0xb7,0x6b,0x58,0xb5,0x8b,0x3f,0x73,0x16,0x03,0xeb,0x40,0x8a};
    static std::uint8_t b56[32] = {0x8a,0xf3,0xd8,0xe5,0x0c,0x46,0x62,0x2b,0xaa,0xa6,0x23,0xae,0x00,0x59,0x6e,0x2e,0xcf,0xf0,0xd9,0x36,0x6b,0xb3,0xe0,0xce,0x09,0x70,0x90,0x89,0x38,0xf4,0x08,0x0f};
    static std::uint8_t c56[32] = {0xbd,0xf6,0x06,0x09,0xf1,0xf3,0x04,0x08,0x0b,0xaf,0x28,0x7f,0x8f,0x15,0x4a,0xb3,0x42,0x9e,0x6e,0x0a,0x4b,0xb7,0x77,0xe8,0x81,0xce,0xe2,0x8c,0xca,0xf7,0x38,0x7a};
    sm2_fp_from_bytes(a, a56);
    sm2_fp_from_bytes(b, b56);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a57[32] = {0xdf,0x79,0xed,0x53,0x80,0xe9,0x4d,0xf3,0xc1,0xb9,0x0a,0x57,0x38,0x77,0x95,0x8e,0x54,0x1c,0x76,0x8c,0x91,0x6a,0xb2,0x87,0x75,0x23,0xe8,0x2e,0x56,0x2e,0xa2,0xc7};
    static std::uint8_t b57[32] = {0xb2,0x1b,0x9b,0x45,0xce,0xe8,0x6c,0xce,0x5d,0x9c,0x30,0xda,0x5c,0x18,0x30,0x95,0x87,0x1f,0x8c,0x27,0x2c,0xd4,0x93,0x5b,0x6a,0xc0,0x9b,0x7b,0x4a,0x8f,0x41,0xc8};
    static std::uint8_t c57[32] = {0x2d,0x5e,0x52,0x0d,0xb2,0x00,0xe1,0x25,0x64,0x1c,0xd9,0x7c,0xdc,0x5f,0x64,0xf8,0xcc,0xfc,0xea,0x65,0x64,0x96,0x1f,0x2c,0x0a,0x63,0x4c,0xb3,0x0b,0x9f,0x60,0xff};
    sm2_fp_from_bytes(a, a57);
    sm2_fp_from_bytes(b, b57);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a58[32] = {0x83,0xd0,0xdf,0x6a,0x6c,0x1d,0xff,0x99,0x2c,0xdc,0x6d,0x97,0x65,0x9a,0xb1,0x27,0x27,0x0c,0x0f,0xed,0xd6,0x9e,0xc4,0x33,0x2e,0x9e,0x68,0xc5,0x24,0xbf,0x4e,0x33};
    static std::uint8_t b58[32] = {0x56,0x94,0xf0,0xf0,0xb9,0x6d,0x14,0xa8,0x5b,0x3c,0xfc,0x6c,0xd5,0x86,0xc4,0x67,0x6c,0x0e,0xa8,0x1d,0x39,0x69,0xca,0x6b,0x58,0x90,0x07,0xa4,0x01,0x07,0xd9,0x6f};
    static std::uint8_t c58[32] = {0x2d,0x3b,0xee,0x79,0xb2,0xb0,0xea,0xf0,0xd1,0x9f,0x71,0x2a,0x90,0x13,0xec,0xbf,0xba,0xfd,0x67,0xd0,0x9d,0x34,0xf9,0xc7,0xd6,0x0e,0x61,0x21,0x23,0xb7,0x74,0xc4};
    sm2_fp_from_bytes(a, a58);
    sm2_fp_from_bytes(b, b58);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a59[32] = {0xbc,0xe1,0x7f,0x63,0x1a,0x30,0xb3,0x0e,0x88,0xc3,0xda,0x83,0xbf,0x2d,0x2e,0x5d,0x9a,0xf4,0xc4,0x10,0xb8,0xe4,0xbf,0x76,0x41,0x33,0xc9,0xca,0x92,0xf9,0xe8,0xad};
    static std::uint8_t b59[32] = {0xc7,0x5b,0x7c,0xdb,0x20,0x48,0xb0,0x8a,0x65,0xd2,0x7b,0xc0,0x08,0x5a,0x4f,0xff,0x62,0x90,0xd5,0x8b,0x13,0xae,0x87,0x5a,0xaf,0xe5,0x5b,0x3d,0x68,0xaf,0x29,0xd6};
    static std::uint8_t c59[32] = {0xf5,0x86,0x02,0x86,0xf9,0xe8,0x02,0x84,0x22,0xf1,0x5e,0xc3,0xb6,0xd2,0xde,0x5e,0x38,0x63,0xee,0x84,0xa5,0x36,0x38,0x1c,0x91,0x4e,0x6e,0x8d,0x2a,0x4a,0xbe,0xd6};
    sm2_fp_from_bytes(a, a59);
    sm2_fp_from_bytes(b, b59);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a60[32] = {0x21,0xc5,0xd7,0x56,0x1e,0xd7,0x48,0x52,0xab,0x1a,0x06,0x71,0xfb,0x90,0x71,0xbd,0x2b,0xcb,0x13,0x09,0x05,0xba,0x64,0x02,0x37,0xf7,0x74,0x16,0xbf,0x83,0x5a,0x66};
    static std::uint8_t b60[32] = {0x51,0x75,0x79,0xfb,0x7e,0xab,0x2d,0x25,0x1e,0x0d,0xeb,0xe7,0x09,0xdb,0x15,0x11,0x36,0x05,0xa6,0xc5,0xa3,0xe5,0x85,0xfb,0x66,0x99,0xf1,0xaa,0x44,0xfa,0x6f,0x32};
    static std::uint8_t c60[32] = {0xd0,0x50,0x5d,0x59,0xa0,0x2c,0x1b,0x2d,0x8d,0x0c,0x1a,0x8a,0xf1,0xb5,0x5c,0xab,0xf5,0xc5,0x6c,0x42,0x61,0xd4,0xde,0x07,0xd1,0x5d,0x82,0x6c,0x7a,0x88,0xeb,0x33};
    sm2_fp_from_bytes(a, a60);
    sm2_fp_from_bytes(b, b60);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a61[32] = {0x8d,0x95,0xd7,0xcd,0x01,0xf0,0xe9,0x8d,0xac,0x85,0xed,0xa0,0xa7,0x53,0xec,0x12,0x06,0x8f,0xe3,0x8c,0xe1,0x3a,0xd8,0x34,0xe7,0x04,0xf1,0xc9,0x88,0xa7,0xeb,0x43};
    static std::uint8_t b61[32] = {0xab,0xc7,0xdf,0xbb,0x65,0x45,0xed,0xff,0xf3,0x2a,0xa7,0xa6,0x7d,0x99,0xe6,0x2a,0xf4,0xe0,0x74,0xe9,0xfe,0xd2,0xbf,0x42,0xae,0xa4,0x01,0xfd,0xf4,0x00,0xe1,0xff};
    static std::uint8_t c61[32] = {0xe1,0xcd,0xf8,0x10,0x9c,0xaa,0xfb,0x8d,0xb9,0x5b,0x45,0xfa,0x29,0xba,0x05,0xe7,0x11,0xaf,0x6e,0xa1,0xe2,0x68,0x18,0xf3,0x38,0x60,0xef,0xcb,0x94,0xa7,0x09,0x43};
    sm2_fp_from_bytes(a, a61);
    sm2_fp_from_bytes(b, b61);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a62[32] = {0xb9,0xe4,0x60,0x6c,0x70,0x14,0xbc,0x5c,0xc6,0xb2,0xcb,0x10,0x80,0x56,0xd7,0xd0,0xca,0x7d,0xe6,0xb4,0x71,0x3e,0x62,0x3f,0x18,0x9e,0x99,0xa3,0x50,0x12,0xd3,0xa9};
    static std::uint8_t b62[32] = {0x29,0xfc,0xb6,0x4b,0xc2,0x6f,0xf8,0x7f,0xca,0x63,0xb7,0xdf,0xcb,0xc4,0xdd,0xab,0xa8,0x8d,0x99,0x43,0x9c,0x7e,0x56,0x89,0x6d,0xfa,0x7b,0x92,0xf5,0x01,0x57,0x5a};
    static std::uint8_t c62[32] = {0x8f,0xe7,0xaa,0x20,0xad,0xa4,0xc3,0xdc,0xfc,0x4f,0x13,0x30,0xb4,0x91,0xfa,0x25,0x21,0xf0,0x4d,0x70,0xd4,0xc0,0x0b,0xb5,0xaa,0xa4,0x1e,0x10,0x5b,0x11,0x7c,0x4f};
    sm2_fp_from_bytes(a, a62);
    sm2_fp_from_bytes(b, b62);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a63[32] = {0x24,0x1e,0x45,0x01,0x1e,0x88,0xa9,0x5b,0xd8,0x18,0x10,0x40,0x50,0x47,0xb2,0xbb,0x6f,0x93,0x97,0x78,0x48,0x6e,0x3b,0x57,0x7a,0x25,0xc5,0xa2,0x8e,0xc2,0x07,0x96};
    static std::uint8_t b63[32] = {0xe4,0x87,0xc9,0xd8,0x70,0xa4,0x91,0x65,0x95,0x44,0x9c,0x6f,0x76,0x7d,0x85,0x2f,0x33,0xd3,0x99,0xe6,0x7b,0x69,0x9e,0x45,0x07,0xaa,0xc0,0x08,0x98,0x35,0xfc,0xca};
    static std::uint8_t c63[32] = {0x3f,0x96,0x7b,0x27,0xad,0xe4,0x17,0xf6,0x42,0xd3,0x73,0xd0,0xd9,0xca,0x2d,0x8c,0x3b,0xbf,0xfd,0x90,0xcd,0x04,0x9d,0x13,0x72,0x7b,0x05,0x99,0xf6,0x8c,0x0a,0xcb};
    sm2_fp_from_bytes(a, a63);
    sm2_fp_from_bytes(b, b63);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a64[32] = {0x24,0x01,0x78,0xcc,0xc7,0x88,0xfb,0xd9,0x9b,0xc7,0x96,0xcc,0xd1,0x54,0xda,0x4e,0x6f,0x51,0xc9,0xaa,0x97,0xd6,0xbc,0x65,0xa4,0xd7,0x5b,0x0b,0xa1,0x4e,0x07,0x1d};
    static std::uint8_t b64[32] = {0x6b,0xcc,0x91,0xf0,0xda,0x10,0x81,0xd3,0x75,0x9d,0xda,0x1b,0x7a,0xa6,0x69,0x11,0x68,0x4c,0xdb,0x3e,0x82,0xac,0x9c,0x3d,0xec,0xe0,0x33,0xcc,0x53,0x13,0xa5,0xe3};
    static std::uint8_t c64[32] = {0xb8,0x34,0xe6,0xda,0xed,0x78,0x7a,0x06,0x26,0x29,0xbc,0xb1,0x56,0xae,0x71,0x3d,0x07,0x04,0xee,0x6b,0x15,0x2a,0x20,0x28,0xb7,0xf7,0x27,0x3f,0x4e,0x3a,0x61,0x39};
    sm2_fp_from_bytes(a, a64);
    sm2_fp_from_bytes(b, b64);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a65[32] = {0x40,0x12,0x5d,0x0d,0x1e,0xa5,0x18,0xa4,0x8d,0xeb,0x0c,0x9e,0x8b,0x02,0xeb,0x76,0xbd,0x11,0x16,0x7a,0xb9,0x2f,0x80,0x38,0x91,0x0c,0x9c,0x92,0xc6,0xef,0xae,0x05};
    static std::uint8_t b65[32] = {0x40,0x25,0x90,0x6b,0x72,0x14,0xd5,0x3b,0x74,0x02,0x4e,0x2a,0xa4,0x2e,0xc9,0x05,0xee,0x08,0x63,0x2c,0xdc,0x54,0xb5,0x0f,0xfe,0x93,0x16,0x95,0x69,0xc0,0x17,0xf6};
    static std::uint8_t c65[32] = {0xff,0xec,0xcc,0xa0,0xac,0x90,0x43,0x69,0x19,0xe8,0xbe,0x73,0xe6,0xd4,0x22,0x70,0xcf,0x08,0xb3,0x4c,0xdc,0xda,0xcb,0x29,0x92,0x79,0x85,0xfd,0x5d,0x2f,0x96,0x0e};
    sm2_fp_from_bytes(a, a65);
    sm2_fp_from_bytes(b, b65);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a66[32] = {0xcd,0x67,0x4e,0x4d,0xec,0x3c,0x2a,0x64,0x79,0x2a,0x7d,0x8b,0x00,0x22,0xda,0x50,0xd6,0x4d,0xcb,0x53,0x6d,0xcf,0xf9,0x2c,0xe7,0xd4,0xad,0x8c,0xb9,0x37,0xf6,0xb3};
    static std::uint8_t b66[32] = {0xb0,0x42,0x3e,0xa4,0xee,0x02,0x2a,0x3e,0x6c,0x2c,0xa5,0xa0,0xe8,0x27,0x27,0xeb,0xf1,0x40,0xa3,0x3a,0x40,0x67,0xc8,0xb1,0x57,0xab,0xd4,0x28,0x32,0xe4,0x61,0xc1};
    static std::uint8_t c66[32] = {0x1d,0x25,0x0f,0xa8,0xfe,0x3a,0x00,0x26,0x0c,0xfd,0xd7,0xea,0x17,0xfb,0xb2,0x64,0xe5,0x0d,0x28,0x19,0x2d,0x68,0x30,0x7b,0x90,0x28,0xd9,0x64,0x86,0x53,0x94,0xf2};
    sm2_fp_from_bytes(a, a66);
    sm2_fp_from_bytes(b, b66);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a67[32] = {0xea,0x45,0xca,0x90,0x29,0xac,0x87,0x80,0xd8,0x63,0x2a,0x46,0xa5,0x1b,0xfa,0x07,0xbc,0x33,0xfe,0xcb,0x69,0x56,0xeb,0xa2,0xa5,0xdf,0xa0,0x04,0x15,0x4a,0x74,0xcf};
    static std::uint8_t b67[32] = {0x9a,0xe8,0x8c,0x5a,0x54,0x07,0x4b,0xaf,0x13,0x71,0x17,0xd4,0x59,0x93,0xef,0x40,0x67,0xc4,0xaf,0xdf,0x64,0x5e,0x2a,0xcd,0xb6,0x3f,0xfd,0xde,0xda,0x92,0xb8,0xab};
    static std::uint8_t c67[32] = {0x4f,0x5d,0x3e,0x35,0xd5,0xa5,0x3b,0xd1,0xc4,0xf2,0x12,0x72,0x4b,0x88,0x0a,0xc7,0x54,0x6f,0x4e,0xec,0x04,0xf8,0xc0,0xd4,0xef,0x9f,0xa2,0x25,0x3a,0xb7,0xbc,0x24};
    sm2_fp_from_bytes(a, a67);
    sm2_fp_from_bytes(b, b67);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a68[32] = {0x09,0x16,0x03,0x29,0x5f,0x97,0xfe,0x24,0x40,0xca,0x41,0x19,0x4f,0xea,0xa6,0x32,0xc2,0x87,0x7d,0x17,0xc8,0x5e,0x83,0x1f,0x46,0x5a,0xb8,0x6a,0x3d,0x3d,0xc5,0x16};
    static std::uint8_t b68[32] = {0x94,0x7c,0x9f,0x3a,0xf6,0x05,0xf4,0x34,0x5b,0x83,0xa1,0x0a,0x56,0xa7,0x15,0x9f,0x38,0xb1,0x52,0x13,0xb2,0x5b,0xd0,0x00,0xba,0x5e,0x3a,0x6d,0x64,0xdd,0xc0,0x04};
    static std::uint8_t c68[32] = {0x74,0x99,0x63,0xed,0x69,0x92,0x09,0xef,0xe5,0x46,0xa0,0x0e,0xf9,0x43,0x90,0x93,0x89,0xd6,0x2b,0x03,0x16,0x02,0xb3,0x1f,0x8b,0xfc,0x7d,0xfc,0xd8,0x60,0x05,0x11};
    sm2_fp_from_bytes(a, a68);
    sm2_fp_from_bytes(b, b68);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a69[32] = {0x74,0xd7,0x0b,0x17,0xea,0x2c,0x78,0xd6,0x88,0xa8,0xcd,0xe8,0x14,0xd4,0xda,0x0c,0x8b,0xdc,0x6f,0x06,0x1f,0x11,0x93,0xd5,0xd3,0x9d,0x09,0x6e,0xa4,0xf4,0x5d,0x86};
    static std::uint8_t b69[32] = {0x92,0xe9,0x9b,0x42,0x63,0x4f,0xd6,0xce,0xb7,0x77,0x23,0x55,0x05,0x6b,0x75,0x11,0xe2,0x16,0xf7,0xf7,0xf0,0x75,0x62,0x46,0xbe,0x6b,0x6d,0xc6,0x94,0xe8,0xd0,0x62};
    static std::uint8_t c69[32] = {0xe1,0xed,0x6f,0xd4,0x86,0xdc,0xa2,0x07,0xd1,0x31,0xaa,0x93,0x0f,0x69,0x64,0xfa,0xa9,0xc5,0x77,0x0d,0x2e,0x9c,0x31,0x90,0x15,0x31,0x9b,0xa8,0x10,0x0b,0x8d,0x23};
    sm2_fp_from_bytes(a, a69);
    sm2_fp_from_bytes(b, b69);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a70[32] = {0xda,0xa7,0xcf,0x2e,0xe2,0x03,0x0a,0x83,0x6d,0xd0,0x38,0x3f,0xd2,0xba,0x8a,0xee,0x96,0x0f,0xbd,0x4d,0x8f,0xc6,0x70,0xb9,0x46,0x96,0x14,0xe4,0x49,0x4b,0xae,0xfd};
    static std::uint8_t b70[32] = {0x5c,0x83,0x42,0x1f,0x06,0xd8,0xe9,0xec,0x7f,0xe2,0x6a,0xbc,0x6d,0x75,0xaf,0x7b,0xd0,0xae,0xca,0x3b,0xa1,0x1e,0xed,0x20,0xc2,0x12,0xfc,0x83,0x40,0xd3,0xa6,0x63};
    static std::uint8_t c70[32] = {0x7e,0x24,0x8d,0x0f,0xdb,0x2a,0x20,0x96,0xed,0xed,0xcd,0x83,0x65,0x44,0xdb,0x72,0xc5,0x60,0xf3,0x11,0xee,0xa7,0x83,0x98,0x84,0x83,0x18,0x61,0x08,0x78,0x08,0x9a};
    sm2_fp_from_bytes(a, a70);
    sm2_fp_from_bytes(b, b70);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a71[32] = {0x89,0xf7,0xb7,0x73,0xa1,0x38,0x5b,0xf7,0x19,0x17,0xb0,0x32,0xd7,0x53,0x5c,0xd5,0x5e,0xc4,0x1f,0x5b,0x98,0x10,0x75,0xd3,0x8e,0xc9,0x68,0xb2,0x65,0xf5,0xa6,0x7d};
    static std::uint8_t b71[32] = {0xb4,0x1d,0x07,0xca,0x34,0x24,0xce,0xb6,0x91,0x1f,0x03,0xb2,0x3d,0xba,0xb2,0xd6,0x0e,0xed,0x2b,0x09,0x6e,0x5b,0x39,0x00,0x79,0xd4,0xcc,0xf3,0xef,0x28,0x30,0xfc};
    static std::uint8_t c71[32] = {0xd5,0xda,0xaf,0xa8,0x6d,0x13,0x8d,0x40,0x87,0xf8,0xac,0x80,0x99,0x98,0xa9,0xff,0x4f,0xd6,0xf4,0x51,0x29,0xb5,0x3c,0xd4,0x14,0xf4,0x9b,0xbe,0x76,0xcd,0x75,0x80};
    sm2_fp_from_bytes(a, a71);
    sm2_fp_from_bytes(b, b71);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a72[32] = {0x2b,0x86,0x7c,0x44,0x3b,0xab,0x9e,0x4c,0x41,0x6b,0x15,0x01,0x8d,0x33,0x3d,0xe1,0xdd,0xf6,0xbd,0x98,0x5a,0x7b,0xde,0xaa,0xc6,0xa4,0x62,0xad,0x2d,0xd0,0x7b,0xe0};
    static std::uint8_t b72[32] = {0xd5,0x6e,0x9b,0x2f,0x17,0x82,0x29,0x77,0x39,0x26,0x24,0x4d,0x8a,0xba,0x9b,0x51,0x3a,0x64,0x62,0xf5,0xa8,0xf2,0xf8,0x1b,0xbf,0x19,0xd8,0xcc,0xce,0x05,0xf8,0x3d};
    static std::uint8_t c72[32] = {0x56,0x17,0xe1,0x14,0x24,0x29,0x74,0xd5,0x08,0x44,0xf0,0xb4,0x02,0x78,0xa2,0x90,0xa3,0x92,0x5a,0xa1,0xb1,0x88,0xe6,0x90,0x07,0x8a,0x89,0xe0,0x5f,0xca,0x83,0xa2};
    sm2_fp_from_bytes(a, a72);
    sm2_fp_from_bytes(b, b72);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a73[32] = {0xa2,0xf9,0x5e,0xf5,0xd3,0xa9,0x76,0xd2,0x2a,0xe9,0x2c,0x38,0xb6,0xe2,0x3e,0xba,0x84,0x15,0x78,0x37,0xed,0x3b,0x6f,0x91,0xe5,0xb1,0x79,0x50,0xd3,0x2e,0x37,0xe0};
    static std::uint8_t b73[32] = {0xd4,0xcd,0x99,0x89,0xa3,0xd8,0x4c,0xa0,0xef,0x76,0x6d,0x75,0xc8,0x06,0x06,0x14,0x98,0xc9,0x5b,0xf9,0x86,0x17,0x1e,0x38,0x04,0xc4,0x5d,0x6e,0xa4,0xdb,0xa3,0x7b};
    static std::uint8_t c73[32] = {0xce,0x2b,0xc5,0x6b,0x2f,0xd1,0x2a,0x31,0x3b,0x72,0xbe,0xc2,0xee,0xdc,0x38,0xa5,0xeb,0x4c,0x1c,0x3d,0x67,0x24,0x51,0x5a,0xe0,0xed,0x1b,0xe2,0x2e,0x52,0x94,0x64};
    sm2_fp_from_bytes(a, a73);
    sm2_fp_from_bytes(b, b73);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a74[32] = {0x19,0x8f,0x5a,0x73,0x6c,0xfc,0x17,0x47,0x4a,0x3c,0x62,0xe3,0x5b,0x08,0xf8,0x1f,0x9f,0x8e,0x16,0xfb,0xa8,0x18,0x6c,0xc3,0xa6,0xa1,0xad,0xd3,0x16,0x2f,0xc1,0x0a};
    static std::uint8_t b74[32] = {0x16,0x0a,0x89,0x4e,0x6e,0x1d,0x87,0x94,0x07,0x20,0xe0,0x25,0xc2,0x83,0x64,0x98,0x9f,0x9f,0x70,0xe2,0xad,0x2f,0xe8,0x13,0x53,0x09,0x8c,0x37,0xd8,0x47,0xcd,0x52};
    static std::uint8_t c74[32] = {0x03,0x84,0xd1,0x24,0xfe,0xde,0x8f,0xb3,0x43,0x1b,0x82,0xbd,0x98,0x85,0x93,0x86,0xff,0xee,0xa6,0x18,0xfa,0xe8,0x84,0xb0,0x53,0x98,0x21,0x9b,0x3d,0xe7,0xf3,0xb8};
    sm2_fp_from_bytes(a, a74);
    sm2_fp_from_bytes(b, b74);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a75[32] = {0xc3,0x45,0xc6,0x60,0x80,0x13,0x9e,0xb1,0x3d,0x01,0xd3,0xe4,0x96,0x0c,0xc7,0xb9,0xf4,0x81,0x96,0xa5,0xdf,0x4a,0x12,0x9f,0xd8,0x10,0x81,0x22,0x73,0x97,0x7d,0x30};
    static std::uint8_t b75[32] = {0x78,0xb5,0x92,0x21,0x6d,0x6f,0x80,0x29,0x9b,0x7a,0x7f,0xdf,0xf5,0x80,0xf8,0xb6,0x5d,0x21,0x7c,0x07,0x8f,0x13,0xa2,0xc2,0xf0,0xac,0xa6,0x01,0xf1,0x90,0x78,0x0a};
    static std::uint8_t c75[32] = {0x4a,0x90,0x34,0x3f,0x12,0xa4,0x1e,0x87,0xa1,0x87,0x54,0x04,0xa0,0x8b,0xcf,0x03,0x97,0x60,0x1a,0x9e,0x50,0x36,0x6f,0xdc,0xe7,0x63,0xdb,0x20,0x82,0x07,0x05,0x26};
    sm2_fp_from_bytes(a, a75);
    sm2_fp_from_bytes(b, b75);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a76[32] = {0xb8,0xbe,0xc8,0x25,0x4d,0xda,0xd6,0x21,0x4f,0xab,0x4b,0xf0,0x9d,0xe7,0x78,0x14,0x96,0x16,0x22,0x60,0x61,0xe0,0xb5,0xb8,0x71,0x0a,0xe6,0xbb,0xf8,0x6c,0xda,0xfb};
    static std::uint8_t b76[32] = {0x0a,0x27,0x84,0xa7,0x9f,0x5a,0x69,0xa3,0x4c,0x0d,0xaf,0x88,0x7f,0x2a,0x3e,0xaf,0x03,0x3b,0x36,0xe8,0xb2,0x9e,0x31,0x73,0xb3,0x7b,0xcd,0x06,0xf9,0x99,0x6b,0xc7};
    static std::uint8_t c76[32] = {0xae,0x97,0x43,0x7d,0xae,0x80,0x6c,0x7e,0x03,0x9d,0x9c,0x68,0x1e,0xbd,0x39,0x65,0x92,0xda,0xeb,0x77,0xaf,0x42,0x84,0x44,0xbd,0x8f,0x19,0xb4,0xfe,0xd3,0x6f,0x34};
    sm2_fp_from_bytes(a, a76);
    sm2_fp_from_bytes(b, b76);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a77[32] = {0x7f,0xcb,0x71,0x6e,0x57,0xbe,0x04,0x42,0xbd,0x92,0xdb,0x0b,0xd5,0x66,0x70,0xfe,0x97,0x0c,0x78,0xf1,0x84,0xa2,0x79,0x98,0x7f,0x6c,0xb5,0x4f,0xa5,0xee,0xba,0xce};
    static std::uint8_t b77[32] = {0xf3,0x07,0x8a,0xa6,0xa2,0x75,0x23,0xfe,0x2b,0x66,0xf3,0x3c,0x78,0x77,0xf5,0x6f,0x36,0x51,0xe6,0x67,0x18,0x7e,0xcf,0x8e,0xca,0x28,0x4f,0xb9,0x37,0xb4,0x9e,0x75};
    static std::uint8_t c77[32] = {0x8c,0xc3,0xe6,0xc6,0xb5,0x48,0xe0,0x44,0x92,0x2b,0xe7,0xcf,0x5c,0xee,0x7b,0x8f,0x60,0xba,0x92,0x89,0x6c,0x23,0xaa,0x0a,0xb5,0x44,0x65,0x96,0x6e,0x3a,0x1c,0x58};
    sm2_fp_from_bytes(a, a77);
    sm2_fp_from_bytes(b, b77);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a78[32] = {0x50,0xf4,0xcd,0xd1,0x8b,0x09,0x3e,0xc0,0x06,0xd3,0x41,0xca,0x59,0x0b,0x49,0xa8,0x22,0x0f,0x6c,0x4b,0xc2,0x9f,0x48,0xb8,0x3f,0xc5,0x00,0x80,0x70,0x0c,0x39,0x9e};
    static std::uint8_t b78[32] = {0x35,0x9d,0xa1,0x29,0xfe,0xd1,0x38,0xd7,0xb1,0x7e,0x1d,0x66,0xa3,0xba,0x0f,0x8a,0x8f,0x16,0x7e,0x2e,0x17,0xb7,0x08,0x5a,0x70,0xbd,0x89,0x3e,0xca,0x70,0x58,0xc3};
    static std::uint8_t c78[32] = {0x1b,0x57,0x2c,0xa7,0x8c,0x38,0x05,0xe8,0x55,0x55,0x24,0x63,0xb5,0x51,0x3a,0x1d,0x92,0xf8,0xee,0x1d,0xaa,0xe8,0x40,0x5d,0xcf,0x07,0x77,0x41,0xa5,0x9b,0xe0,0xdb};
    sm2_fp_from_bytes(a, a78);
    sm2_fp_from_bytes(b, b78);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a79[32] = {0x84,0x57,0xd3,0x4c,0x06,0xe0,0xd0,0x16,0x37,0x7f,0x3a,0x0f,0x5e,0x43,0xc9,0x33,0x5e,0x56,0x9a,0xd6,0x69,0x22,0x3c,0xff,0xb7,0xa1,0x0a,0xc9,0x73,0x51,0x60,0x62};
    static std::uint8_t b79[32] = {0x18,0xe6,0xcc,0x91,0x84,0x9a,0x1a,0xbf,0xe9,0x30,0x5c,0xac,0x6c,0xf3,0x31,0xd3,0x97,0x76,0xaf,0xac,0x92,0x42,0xba,0xd6,0x26,0xa9,0x6a,0x03,0xa4,0xf6,0xc2,0xb4};
    static std::uint8_t c79[32] = {0x6b,0x71,0x06,0xba,0x82,0x46,0xb5,0x56,0x4e,0x4e,0xdd,0x62,0xf1,0x50,0x97,0x5f,0xc6,0xdf,0xeb,0x29,0xd6,0xdf,0x82,0x29,0x90,0xf7,0xa0,0xc5,0xce,0x5a,0x9d,0xae};
    sm2_fp_from_bytes(a, a79);
    sm2_fp_from_bytes(b, b79);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a80[32] = {0xb1,0x55,0x6f,0x5e,0x10,0xf1,0xfb,0x68,0x0d,0x95,0x37,0xd4,0x6e,0xb5,0x29,0xcf,0x14,0x4f,0x77,0x94,0x92,0x55,0xd1,0x1b,0xaa,0x65,0x95,0x3c,0x85,0x11,0x08,0x5e};
    static std::uint8_t b80[32] = {0x6b,0x3b,0x2b,0xa5,0x80,0xe1,0xe4,0xab,0xbe,0xfd,0xa4,0x23,0x66,0xc3,0x79,0x1a,0xa3,0xed,0x8d,0xda,0x0b,0x9c,0x87,0x0c,0xf4,0x56,0x5f,0x12,0xc6,0xdf,0xd1,0x96};
    static std::uint8_t c80[32] = {0x46,0x1a,0x43,0xb8,0x90,0x10,0x16,0xbc,0x4e,0x97,0x93,0xb1,0x07,0xf1,0xb0,0xb4,0x70,0x61,0xe9,0xba,0x86,0xb9,0x4a,0x0e,0xb6,0x0f,0x36,0x29,0xbe,0x31,0x36,0xc8};
    sm2_fp_from_bytes(a, a80);
    sm2_fp_from_bytes(b, b80);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a81[32] = {0xcc,0xf9,0xb3,0xc6,0xce,0x65,0x16,0x26,0xae,0xf8,0x79,0x6c,0x2b,0xfe,0x59,0x63,0x05,0xd6,0x61,0x58,0x33,0x43,0x45,0x99,0xf0,0xa8,0x01,0x1a,0x49,0x04,0x08,0x95};
    static std::uint8_t b81[32] = {0xb5,0xee,0x2d,0x3e,0x15,0xcc,0x86,0xab,0x90,0x92,0x4d,0x1a,0x81,0x49,0x6d,0xa2,0x37,0x8b,0xda,0x07,0x56,0x3a,0x61,0xcd,0xce,0x66,0xed,0x6e,0xef,0x4b,0x45,0x41};
    static std::uint8_t c81[32] = {0x17,0x0b,0x86,0x88,0xb8,0x98,0x8f,0x7b,0x1e,0x66,0x2c,0x51,0xaa,0xb4,0xeb,0xc0,0xce,0x4a,0x87,0x50,0xdd,0x08,0xe3,0xcc,0x22,0x41,0x13,0xab,0x59,0xb8,0xc3,0x54};
    sm2_fp_from_bytes(a, a81);
    sm2_fp_from_bytes(b, b81);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a82[32] = {0xa7,0x24,0x94,0xcd,0xb4,0x34,0x63,0x52,0x31,0x3a,0xbd,0xe2,0xad,0x48,0xca,0xf0,0xb1,0xc6,0xed,0x2b,0x24,0xc3,0xb9,0x1a,0x29,0x6e,0x73,0xcc,0xd3,0xb4,0xe6,0x1b};
    static std::uint8_t b82[32] = {0x84,0x81,0x32,0x39,0x9c,0x21,0x2d,0x58,0x2d,0x31,0x3b,0x48,0x08,0x6f,0xc2,0x53,0xd9,0xe9,0x29,0x3f,0xa4,0x5d,0xfd,0x1f,0x58,0x1e,0xa9,0x8a,0xb4,0x2f,0x33,0xc6};
    static std::uint8_t c82[32] = {0x22,0xa3,0x62,0x94,0x18,0x13,0x35,0xfa,0x04,0x09,0x82,0x9a,0xa4,0xd9,0x08,0x9c,0xd7,0xdd,0xc3,0xeb,0x80,0x65,0xbb,0xfa,0xd1,0x4f,0xca,0x42,0x1f,0x85,0xb2,0x55};
    sm2_fp_from_bytes(a, a82);
    sm2_fp_from_bytes(b, b82);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a83[32] = {0x43,0x3c,0xdf,0x13,0xc1,0x72,0x69,0xd8,0xba,0x1b,0x52,0x58,0x9e,0x18,0xe9,0x5a,0x4b,0x29,0xe9,0x7b,0x29,0xa2,0xa3,0xaa,0xbf,0x26,0x6a,0xe8,0xdf,0x64,0x76,0xcf};
    static std::uint8_t b83[32] = {0x2b,0x84,0xc8,0x4f,0xe5,0x32,0xb0,0x33,0x6d,0xe1,0xc9,0x14,0x76,0xfa,0x6c,0xca,0xa6,0x2a,0xde,0x90,0x3a,0x17,0xe2,0x2c,0x98,0xec,0x1d,0xae,0x7e,0xb1,0x1b,0xef};
    static std::uint8_t c83[32] = {0x17,0xb8,0x16,0xc3,0xdc,0x3f,0xb9,0xa5,0x4c,0x39,0x89,0x44,0x27,0x1e,0x7c,0x8f,0xa4,0xff,0x0a,0xea,0xef,0x8a,0xc1,0x7e,0x26,0x3a,0x4d,0x3a,0x60,0xb3,0x5a,0xe0};
    sm2_fp_from_bytes(a, a83);
    sm2_fp_from_bytes(b, b83);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a84[32] = {0x04,0xaa,0xe4,0x08,0xba,0x44,0xd0,0x2c,0xfd,0xc6,0x8d,0x9e,0x5d,0x80,0x97,0x7c,0x5e,0xd8,0x70,0xbc,0x08,0x03,0xfb,0xd3,0x58,0xe5,0x9d,0xf5,0xc2,0xb7,0x64,0xe1};
    static std::uint8_t b84[32] = {0xb4,0x14,0x3e,0x7f,0x50,0xb8,0xe3,0xa3,0xa3,0x54,0x10,0x57,0x64,0x21,0x36,0x38,0x67,0x49,0x7f,0x8b,0xe3,0xbb,0xd9,0x07,0x14,0xd1,0x0b,0x0e,0xe6,0x97,0x8e,0x2b};
    static std::uint8_t c84[32] = {0x50,0x96,0xa5,0x88,0x69,0x8b,0xec,0x89,0x5a,0x72,0x7d,0x46,0xf9,0x5f,0x61,0x43,0xf7,0x8e,0xf1,0x2f,0x24,0x48,0x22,0xcd,0x44,0x14,0x92,0xe6,0xdc,0x1f,0xd6,0xb5};
    sm2_fp_from_bytes(a, a84);
    sm2_fp_from_bytes(b, b84);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a85[32] = {0x79,0x0d,0x16,0x26,0x4e,0x80,0x07,0x01,0x7f,0xdc,0xa9,0x6a,0x80,0x58,0xb7,0xd9,0x80,0x45,0xee,0x82,0xc7,0x29,0x48,0xaa,0x11,0x7c,0x2d,0x7b,0x7a,0xee,0x1d,0xf8};
    static std::uint8_t b85[32] = {0xd4,0x8f,0xae,0xd7,0x2a,0x48,0xca,0xff,0xab,0x4a,0xd4,0x8d,0x3b,0xe6,0x26,0x93,0xc0,0x7a,0x6b,0x8d,0xe8,0xe6,0x61,0x63,0xba,0x62,0x07,0x7c,0x1a,0x9d,0x37,0x08};
    static std::uint8_t c85[32] = {0xa4,0x7d,0x67,0x4e,0x24,0x37,0x3c,0x01,0xd4,0x91,0xd4,0xdd,0x44,0x72,0x91,0x45,0xbf,0xcb,0x82,0xf3,0xde,0x42,0xe7,0x47,0x57,0x1a,0x25,0xff,0x60,0x50,0xe6,0xef};
    sm2_fp_from_bytes(a, a85);
    sm2_fp_from_bytes(b, b85);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a86[32] = {0xe5,0xc5,0x7e,0x6e,0x0e,0xd8,0x8a,0xc9,0x19,0xd7,0x18,0x05,0x37,0xbc,0x4e,0xf1,0xd1,0xb6,0x30,0xd1,0x42,0x9d,0xd6,0xee,0x27,0x07,0x66,0x86,0x29,0x47,0x6b,0x0c};
    static std::uint8_t b86[32] = {0x2f,0xcd,0x15,0x9c,0x3c,0x54,0x35,0x23,0x7f,0xef,0x03,0xeb,0xf5,0xac,0x8e,0xfe,0x4e,0x67,0x93,0x7e,0x67,0xae,0xf0,0xfe,0xda,0xee,0xb6,0x12,0x81,0xc8,0xaf,0x46};
    static std::uint8_t c86[32] = {0xb5,0xf8,0x68,0xd1,0xd2,0x84,0x55,0xa5,0x99,0xe8,0x14,0x19,0x42,0x0f,0xbf,0xf3,0x83,0x4e,0x9d,0x52,0xda,0xee,0xe5,0xef,0x4c,0x18,0xb0,0x73,0xa7,0x7e,0xbb,0xc6};
    sm2_fp_from_bytes(a, a86);
    sm2_fp_from_bytes(b, b86);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a87[32] = {0x8d,0xae,0x37,0x86,0x6f,0x8e,0xbb,0xe9,0xa4,0x1c,0x4d,0x06,0xdd,0xa9,0xe7,0x88,0x4e,0x9e,0x11,0x69,0xb3,0x29,0x3c,0xa6,0x70,0x2f,0x8a,0x04,0x94,0xe9,0x5c,0xb5};
    static std::uint8_t b87[32] = {0x92,0x88,0x70,0x85,0x11,0x16,0x8b,0x96,0xb2,0x68,0x19,0x89,0x3b,0xcc,0x29,0x4b,0xcf,0xd0,0xc6,0x52,0xee,0x59,0x67,0x60,0x06,0x05,0x0d,0xb6,0xcb,0x1b,0x8e,0xdb};
    static std::uint8_t c87[32] = {0xfb,0x25,0xc7,0x00,0x5e,0x78,0x30,0x52,0xf1,0xb4,0x33,0x7d,0xa1,0xdd,0xbe,0x3c,0x7e,0xcd,0x4b,0x15,0xc4,0xcf,0xd5,0x47,0x6a,0x2a,0x7c,0x4d,0xc9,0xcd,0xcd,0xd9};
    sm2_fp_from_bytes(a, a87);
    sm2_fp_from_bytes(b, b87);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a88[32] = {0x86,0xfa,0xa7,0x0e,0x87,0x02,0x77,0xed,0xf1,0xba,0xb0,0x80,0xf1,0x7a,0x3f,0xa9,0x99,0x3d,0xd8,0xf2,0x12,0xb4,0xa9,0x22,0x7d,0x69,0x33,0x98,0x10,0x09,0x0a,0x59};
    static std::uint8_t b88[32] = {0x96,0x6e,0x71,0xb0,0xa4,0x11,0x1e,0x51,0xd4,0x62,0xd1,0xe5,0x3d,0xfc,0x10,0x05,0xd7,0xc9,0xf3,0xe3,0xb4,0xeb,0x38,0x9d,0x90,0x09,0x2b,0xaa,0x08,0x3d,0x39,0x62};
    static std::uint8_t c88[32] = {0xf0,0x8c,0x35,0x5c,0xe2,0xf1,0x59,0x9c,0x1d,0x57,0xde,0x9b,0xb3,0x7e,0x2f,0xa3,0xc1,0x73,0xe5,0x0d,0x5d,0xc9,0x70,0x85,0xed,0x60,0x07,0xee,0x07,0xcb,0xd0,0xf6};
    sm2_fp_from_bytes(a, a88);
    sm2_fp_from_bytes(b, b88);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a89[32] = {0xc7,0xc5,0xdc,0xf2,0x22,0xb6,0xef,0xa5,0x22,0xcf,0x91,0x50,0x68,0x39,0xe4,0x80,0x8b,0xa8,0xb9,0xc4,0xdc,0x7c,0x14,0x4f,0x73,0x48,0x26,0xcf,0x96,0xf5,0x37,0xee};
    static std::uint8_t b89[32] = {0x42,0x6c,0x0f,0xe5,0xc6,0x6e,0xbf,0xdc,0xee,0xab,0x69,0xc1,0x36,0x60,0x05,0x56,0xd1,0xa2,0x47,0x88,0xc7,0xb7,0x00,0x5d,0xec,0x62,0x2c,0xf4,0xba,0x5f,0x36,0x0c};
    static std::uint8_t c89[32] = {0x85,0x59,0xcd,0x0c,0x5c,0x48,0x2f,0xc8,0x34,0x24,0x27,0x8f,0x31,0xd9,0xdf,0x29,0xba,0x06,0x72,0x3c,0x14,0xc5,0x13,0xf1,0x86,0xe5,0xf9,0xda,0xdc,0x96,0x01,0xe2};
    sm2_fp_from_bytes(a, a89);
    sm2_fp_from_bytes(b, b89);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a90[32] = {0xfa,0x71,0xd7,0x20,0xcc,0x4c,0xf3,0x23,0x5c,0xc6,0x5d,0xad,0x68,0x70,0xe8,0xde,0x0c,0xc3,0xd4,0xa2,0xa3,0x2d,0xb8,0xa2,0xed,0x42,0xe4,0x97,0x02,0x2d,0x11,0x31};
    static std::uint8_t b90[32] = {0x14,0x9c,0xb8,0xb2,0x91,0x1d,0x3e,0xed,0xd5,0x08,0xe1,0xc5,0x39,0x3a,0xe7,0x5f,0xd9,0xd2,0xc8,0x50,0xd9,0x69,0xff,0x92,0xdf,0x6e,0x6c,0x97,0x79,0x43,0x6c,0x12};
    static std::uint8_t c90[32] = {0xe5,0xd5,0x1e,0x6e,0x3b,0x2f,0xb4,0x35,0x87,0xbd,0x7b,0xe8,0x2f,0x36,0x01,0x7e,0x32,0xf1,0x0c,0x51,0xc9,0xc3,0xb9,0x10,0x0d,0xd4,0x77,0xff,0x88,0xe9,0xa5,0x1f};
    sm2_fp_from_bytes(a, a90);
    sm2_fp_from_bytes(b, b90);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a91[32] = {0x8e,0xa0,0x97,0xb2,0x1e,0x4c,0x9a,0xee,0xed,0xbe,0x76,0x13,0xb7,0x7e,0xf4,0x00,0x30,0x4a,0xd9,0xec,0x22,0x43,0x8f,0xe9,0x39,0xe1,0x28,0x77,0xbf,0x24,0xaa,0x2f};
    static std::uint8_t b91[32] = {0xe6,0xc2,0x38,0x9e,0x8e,0xae,0x3f,0xff,0x90,0x1b,0x76,0x5c,0xf1,0x63,0x7a,0x24,0xbf,0x28,0x09,0x18,0x31,0x67,0xe4,0x09,0x68,0xd0,0x8e,0xed,0xe5,0x76,0x3b,0x32};
    static std::uint8_t c91[32] = {0xa7,0xde,0x5f,0x12,0x8f,0x9e,0x5a,0xef,0x5d,0xa2,0xff,0xb6,0xc6,0x1b,0x79,0xdb,0x71,0x22,0xd0,0xd2,0xf0,0xdb,0xab,0xe0,0xd1,0x10,0x99,0x89,0xd9,0xae,0x6e,0xfc};
    sm2_fp_from_bytes(a, a91);
    sm2_fp_from_bytes(b, b91);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a92[32] = {0x86,0x6f,0x85,0x7e,0x5e,0x96,0xcb,0xf7,0xbd,0xab,0xd4,0xab,0xf1,0xf4,0x94,0xfb,0x43,0xe8,0x7e,0x07,0x86,0x4e,0xdc,0x3f,0x0e,0xdb,0x2f,0x34,0x50,0x96,0x7a,0xe2};
    static std::uint8_t b92[32] = {0xd5,0x28,0x57,0xf2,0x57,0xcc,0x40,0xa6,0x04,0xc0,0x6d,0x6d,0xe1,0x48,0xcb,0x33,0x86,0x7c,0xe1,0x9e,0x70,0xfe,0x31,0xa3,0xba,0xcb,0x5a,0x29,0xfc,0xa1,0x28,0x9e};
    static std::uint8_t c92[32] = {0xb1,0x47,0x2d,0x8b,0x06,0xca,0x8b,0x51,0xb8,0xeb,0x67,0x3e,0x10,0xab,0xc9,0xc7,0xbd,0x6b,0x9c,0x68,0x15,0x50,0xaa,0x9c,0x54,0x0f,0xd5,0x0a,0x53,0xf5,0x52,0x43};
    sm2_fp_from_bytes(a, a92);
    sm2_fp_from_bytes(b, b92);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a93[32] = {0xbf,0x70,0xe2,0xb3,0x71,0x5e,0xb6,0xaa,0x44,0x54,0x80,0xed,0xbb,0x6f,0xb7,0x5c,0xa7,0xfa,0xf6,0x34,0x9a,0x2b,0xa5,0xe7,0x7d,0x89,0x00,0xc2,0xde,0x0c,0xd3,0xaf};
    static std::uint8_t b93[32] = {0x49,0x80,0x36,0xbf,0x85,0x5c,0xe9,0xb1,0x6c,0xfc,0x68,0xc2,0x5a,0x77,0x68,0x8f,0x01,0x1f,0xc6,0x83,0xd8,0x5a,0x49,0xfa,0x64,0x9e,0xcd,0x51,0x69,0x4f,0xef,0x93};
    static std::uint8_t c93[32] = {0x75,0xf0,0xab,0xf3,0xec,0x01,0xcc,0xf8,0xd7,0x58,0x18,0x2b,0x60,0xf8,0x4e,0xcd,0xa6,0xdb,0x2f,0xb0,0xc1,0xd1,0x5b,0xed,0x18,0xea,0x33,0x71,0x74,0xbc,0xe4,0x1c};
    sm2_fp_from_bytes(a, a93);
    sm2_fp_from_bytes(b, b93);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a94[32] = {0xb2,0x23,0xb2,0xd2,0x62,0x62,0x49,0xb8,0x9f,0xbd,0x75,0xbe,0xde,0x9f,0x91,0x74,0x93,0x5b,0x56,0x07,0x72,0x39,0x19,0xcf,0xbe,0x1e,0x95,0xd2,0x2b,0x58,0x7f,0xf3};
    static std::uint8_t b94[32] = {0x11,0xcd,0x90,0x25,0x66,0xbc,0xf6,0x43,0xd6,0xf7,0xae,0xf7,0x61,0xf2,0x1e,0xcd,0xb9,0x8a,0xe4,0x67,0x44,0xc2,0xd3,0x3a,0xcf,0x62,0x89,0x16,0xca,0xad,0x3b,0xf0};
    static std::uint8_t c94[32] = {0xa0,0x56,0x22,0xac,0xfb,0xa5,0x53,0x74,0xc8,0xc5,0xc6,0xc7,0x7c,0xad,0x72,0xa6,0xd9,0xd0,0x71,0xa0,0x2d,0x76,0x46,0x94,0xee,0xbc,0x0c,0xbb,0x60,0xab,0x44,0x03};
    sm2_fp_from_bytes(a, a94);
    sm2_fp_from_bytes(b, b94);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a95[32] = {0xb5,0x14,0xb2,0x61,0x6e,0x1a,0xfe,0x0c,0x11,0x96,0x70,0x64,0xe3,0x41,0x42,0x41,0xbd,0x89,0xe9,0x55,0x0c,0xe3,0x76,0x80,0xcd,0x1a,0x03,0x02,0x99,0xf7,0x85,0x4e};
    static std::uint8_t b95[32] = {0xf5,0x21,0x1f,0x5d,0xaf,0x40,0x20,0xe4,0xfb,0x57,0x3b,0xed,0x5a,0x23,0x78,0x89,0xad,0xc1,0xf6,0x00,0x71,0x3b,0x5b,0x16,0xf3,0x96,0x37,0x15,0x44,0x2b,0xee,0x46};
    static std::uint8_t c95[32] = {0xbf,0xf3,0x93,0x02,0xbe,0xda,0xdd,0x27,0x16,0x3f,0x34,0x77,0x89,0x1d,0xc9,0xb8,0x0f,0xc7,0xf3,0x53,0x9b,0xa8,0x1b,0x6a,0xd9,0x83,0xcb,0xed,0x55,0xcb,0x97,0x07};
    sm2_fp_from_bytes(a, a95);
    sm2_fp_from_bytes(b, b95);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a96[32] = {0xd3,0x5a,0x03,0x8e,0x75,0x97,0xec,0x18,0x7c,0x61,0x92,0x38,0x8c,0x50,0x40,0xd4,0xef,0xce,0x50,0x41,0xeb,0x13,0x61,0x0e,0xfd,0xee,0x9c,0x31,0xec,0xbc,0x6e,0x4a};
    static std::uint8_t b96[32] = {0xd2,0xba,0xcc,0xa0,0xb9,0xcc,0x6f,0x7e,0x78,0x6c,0x86,0x08,0x7c,0xf2,0x55,0x9d,0xe8,0x84,0x22,0x18,0x83,0xe8,0xc3,0xfa,0xdd,0x71,0x5c,0x45,0xbc,0xd6,0xb5,0x0c};
    static std::uint8_t c96[32] = {0x00,0x9f,0x36,0xed,0xbb,0xcb,0x7c,0x9a,0x03,0xf5,0x0c,0x30,0x0f,0x5d,0xeb,0x37,0x07,0x4a,0x2e,0x29,0x67,0x2a,0x9d,0x14,0x20,0x7d,0x3f,0xec,0x2f,0xe5,0xb9,0x3e};
    sm2_fp_from_bytes(a, a96);
    sm2_fp_from_bytes(b, b96);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a97[32] = {0x2c,0x8d,0x6d,0x59,0x0d,0xef,0x43,0xf8,0xb3,0x9c,0xfa,0x16,0x39,0xe4,0xb4,0x06,0x74,0xa3,0x27,0x96,0xcd,0x02,0x11,0xbe,0x7b,0xaa,0xa4,0x24,0xab,0xb3,0x57,0xe6};
    static std::uint8_t b97[32] = {0x4c,0xef,0xa1,0x5f,0x91,0xda,0x5b,0xa0,0x6f,0xe6,0x77,0xc9,0x62,0x3c,0x6b,0xb0,0x00,0xaf,0x8d,0x24,0x17,0x40,0x27,0xe2,0x3d,0x3d,0xb6,0x10,0xf3,0x67,0x67,0x0b};
    static std::uint8_t c97[32] = {0xdf,0x9d,0xcb,0xf8,0x7c,0x14,0xe8,0x58,0x43,0xb6,0x82,0x4c,0xd7,0xa8,0x48,0x56,0x73,0xf3,0x9a,0x71,0xb5,0xc1,0xe9,0xdd,0x3e,0x6c,0xee,0x13,0xb8,0x4b,0xf0,0xda};
    sm2_fp_from_bytes(a, a97);
    sm2_fp_from_bytes(b, b97);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a98[32] = {0xa1,0x72,0x25,0xd7,0xaa,0xeb,0xa9,0x9f,0xe9,0x98,0x35,0xe0,0x84,0x49,0x6c,0x92,0x99,0x5d,0x58,0x04,0x45,0x1b,0x1f,0xf8,0xcc,0x10,0xd9,0xa6,0xf4,0x46,0xc7,0xb4};
    static std::uint8_t b98[32] = {0xb2,0x8a,0x86,0x5a,0xbf,0x87,0x4c,0xd7,0xab,0x73,0x8c,0xa8,0x37,0x2d,0x5f,0xa0,0x83,0x08,0x9a,0xc5,0x1f,0x0a,0xae,0x5c,0x51,0xbb,0x0b,0x61,0x8a,0x6f,0xfa,0x04};
    static std::uint8_t c98[32] = {0xee,0xe7,0x9f,0x7b,0xeb,0x64,0x5c,0xc8,0x3e,0x24,0xa9,0x38,0x4d,0x1c,0x0c,0xf2,0x16,0x54,0xbd,0x3e,0x26,0x10,0x71,0x9d,0x7a,0x55,0xce,0x45,0x69,0xd6,0xcd,0xaf};
    sm2_fp_from_bytes(a, a98);
    sm2_fp_from_bytes(b, b98);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }

    static std::uint8_t a99[32] = {0xa6,0xc6,0xcd,0xc3,0x67,0x3c,0xdc,0x61,0x63,0xb1,0x36,0x3d,0xe5,0x4e,0x50,0xbf,0xc4,0x1c,0x0e,0x22,0x53,0xb2,0x77,0x1c,0x3a,0x4f,0xfb,0xef,0xff,0x77,0xe6,0x14};
    static std::uint8_t b99[32] = {0xdd,0x24,0xcc,0x4a,0xba,0x41,0x54,0x3b,0xc3,0xaf,0x14,0x71,0xf0,0x1d,0x2a,0xb8,0xd8,0x89,0x8c,0xdd,0x33,0xbe,0x55,0xab,0xe1,0xa4,0x11,0xf5,0x19,0x65,0xcb,0x54};
    static std::uint8_t c99[32] = {0xc9,0xa2,0x01,0x77,0xac,0xfb,0x88,0x25,0xa0,0x02,0x21,0xcb,0xf5,0x31,0x26,0x06,0xeb,0x92,0x81,0x44,0x1f,0xf4,0x21,0x71,0x58,0xab,0xe9,0xfa,0xe6,0x12,0x1a,0xbf};
    sm2_fp_from_bytes(a, a99);
    sm2_fp_from_bytes(b, b99);
    sm2_fp_sub(c, a, b);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sub");
    }
}